1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Add shindo tests for volume models and collection.

This commit is contained in:
Rupak Ganguly 2012-07-11 17:00:32 -04:00
parent f0b010478b
commit 66bfd3c4e3
2 changed files with 24 additions and 3 deletions

View file

@ -0,0 +1,21 @@
Shindo.tests("Fog::BlockStorage[:hp] | volumes", ['hp', 'block_storage']) do
model_tests(Fog::BlockStorage[:hp].volumes, {:name => "fogvoltests", :description => "fogvoltests-desc", :size => 1}, true)
tests("new volume") do
@volume = Fog::BlockStorage[:hp].volumes.create(:name => "testvol", :size => 1)
@volume.wait_for { ready? } unless Fog.mocking?
test("get(#{@volume.id})") do
Fog::BlockStorage[:hp].volumes.get(@volume.id) != nil?
end
test("has_attachments?") do
@volume.has_attachments? == false
end
after do
@volume.destroy
end
end
end

View file

@ -2,12 +2,12 @@ Shindo.tests('Fog::BlockStorage[:hp] | volume requests', ['hp', 'block_storage']
@volume_format = { @volume_format = {
'status' => String, 'status' => String,
'displayDescription' => String, 'displayDescription' => Fog::Nullable::String,
'availabilityZone' => String, 'availabilityZone' => String,
'displayName' => String, 'displayName' => Fog::Nullable::String,
'attachments' => [Fog::Nullable::Hash], 'attachments' => [Fog::Nullable::Hash],
'volumeType' => Fog::Nullable::String, 'volumeType' => Fog::Nullable::String,
'snapshotId' => String, 'snapshotId' => Fog::Nullable::String,
'size' => Integer, 'size' => Integer,
'id' => Integer, 'id' => Integer,
'createdAt' => String, 'createdAt' => String,