mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[voxel|compute] minor fixes for voxel tests
This commit is contained in:
parent
80d0ab9360
commit
9e9cd7ec1c
2 changed files with 31 additions and 25 deletions
|
@ -1,45 +1,51 @@
|
|||
Shindo.tests('Voxel::Compute | image requests', ['voxel']) do
|
||||
|
||||
@images_format = [{
|
||||
'id' => Integer,
|
||||
'summary' => String
|
||||
}]
|
||||
@images_format = {
|
||||
'images' => [{
|
||||
'id' => Integer,
|
||||
'summary' => String
|
||||
}],
|
||||
'stat' => String
|
||||
}
|
||||
|
||||
@image_format = {
|
||||
'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
|
||||
'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
|
||||
}
|
||||
|
||||
tests('success') do
|
||||
tests('#images_list').formats(@images_format) do
|
||||
pending if Fog.mocking?
|
||||
Voxel[:compute].images_list
|
||||
Voxel[:compute].images_list.body
|
||||
end
|
||||
|
||||
tests('#images_list(1)').formats([@image_format]) do
|
||||
tests('#images_list(1)').formats(@image_format) do
|
||||
pending if Fog.mocking?
|
||||
Voxel[:compute].images_list(1)
|
||||
Voxel[:compute].images_list(1).body
|
||||
end
|
||||
end
|
||||
|
||||
tests('failure') do
|
||||
tests('#images_list(0)').raises(Fog::Voxel::Compute::Error) do
|
||||
pending if Fog.mocking?
|
||||
Voxel[:compute].images_list(0)
|
||||
Voxel[:compute].images_list(0).body
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ Shindo.tests('Voxel::Compute | server requests', ['voxel']) do
|
|||
'access_methods' => [],
|
||||
'description' => String,
|
||||
'drives' => {
|
||||
'position' => Integer,
|
||||
'position' => Fog::Nullable::Integer,
|
||||
'size' => Integer
|
||||
},
|
||||
'id' => String,
|
||||
|
|
Loading…
Reference in a new issue