2011-06-16 19:28:54 -04:00
|
|
|
Shindo.tests('Fog::Compute[:voxel] | image requests', ['voxel']) do
|
2011-02-20 14:39:37 -05:00
|
|
|
|
2011-05-10 19:26:38 -04:00
|
|
|
@images_format = {
|
|
|
|
'images' => [{
|
|
|
|
'id' => Integer,
|
|
|
|
'summary' => String
|
|
|
|
}],
|
|
|
|
'stat' => String
|
|
|
|
}
|
2011-02-23 18:00:56 -05:00
|
|
|
|
2011-02-20 14:39:37 -05:00
|
|
|
@image_format = {
|
2011-05-10 19:26:38 -04:00
|
|
|
'images' => [{
|
|
|
|
'description' => String,
|
|
|
|
'id' => Integer,
|
|
|
|
'filesystem' => {
|
|
|
|
'size' => Integer,
|
|
|
|
'type' => String,
|
|
|
|
'units' => String,
|
|
|
|
},
|
|
|
|
'operating_system' => {
|
|
|
|
'admin_username' => String,
|
|
|
|
'architecture' => Integer,
|
|
|
|
'family' => String,
|
|
|
|
'product_family' => String,
|
|
|
|
'product_version' => String,
|
|
|
|
'version' => String
|
|
|
|
},
|
|
|
|
'summary' => String
|
|
|
|
}],
|
|
|
|
'stat' => String
|
2011-02-20 14:39:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
tests('success') do
|
2011-02-23 18:00:56 -05:00
|
|
|
tests('#images_list').formats(@images_format) do
|
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:voxel].images_list.body
|
2011-02-20 14:39:37 -05:00
|
|
|
end
|
|
|
|
|
2011-05-10 19:26:38 -04:00
|
|
|
tests('#images_list(1)').formats(@image_format) do
|
2011-02-23 18:00:56 -05:00
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:voxel].images_list(1).body
|
2011-02-20 14:39:37 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
2011-06-16 19:28:54 -04:00
|
|
|
tests('#images_list(0)').raises(Fog::Compute::Voxel::Error) do
|
2011-02-23 18:00:56 -05:00
|
|
|
pending if Fog.mocking?
|
2011-06-16 19:28:54 -04:00
|
|
|
Fog::Compute[:voxel].images_list(0).body
|
2011-02-20 14:39:37 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|