2010-09-09 17:50:38 -07:00
|
|
|
Shindo.tests('Slicehost::Compute | image requests', ['slicehost']) do
|
2010-05-31 21:39:17 -07:00
|
|
|
|
|
|
|
@image_format = {
|
|
|
|
'id' => Integer,
|
|
|
|
'name' => String
|
|
|
|
}
|
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
|
|
|
tests('#get_image(19)').formats(@image_format) do
|
2010-10-13 17:54:14 -07:00
|
|
|
pending if Fog.mocking?
|
2010-09-09 17:50:38 -07:00
|
|
|
Slicehost[:compute].get_image(19).body
|
2010-05-31 21:39:17 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
tests('#get_images').formats({ 'images' => [@image_format] }) do
|
2010-10-13 17:54:14 -07:00
|
|
|
pending if Fog.mocking?
|
2010-09-09 17:50:38 -07:00
|
|
|
Slicehost[:compute].get_images.body
|
2010-05-31 21:39:17 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
|
|
|
|
tests('#get_image(0)').raises(Excon::Errors::Forbidden) do
|
2010-10-13 17:54:14 -07:00
|
|
|
pending if Fog.mocking?
|
2010-09-09 17:50:38 -07:00
|
|
|
Slicehost[:compute].get_image(0)
|
2010-05-31 21:39:17 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|