1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/serverlove/requests/compute/image_tests.rb
2012-04-29 20:50:17 +01:00

35 lines
930 B
Ruby

Shindo.tests('Fog::Compute[:serverlove] | drive requests', ['serverlove']) do
@image_format = {
'drive' => String,
'name' => String,
'user' => String,
'size' => Integer,
'claimed' => Fog::Nullable::String,
'status' => String,
'encryption:cipher' => String,
'read:bytes' => String,
'write:bytes' => String,
'read:requests' => String,
'write:requests' => String
}
tests('success') do
attributes = { name: 'Test', size: 12345 }
tests("#create_image").formats(@image_format) do
@image = Fog::Compute[:serverlove].create_image(attributes).body
end
tests("#list_images").succeeds do
Fog::Compute[:serverlove].images
end
tests("#destroy_image").succeeds do
Fog::Compute[:serverlove].destroy_image(@image['drive'])
end
end
end