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:
parent
f0b010478b
commit
66bfd3c4e3
2 changed files with 24 additions and 3 deletions
21
tests/hp/models/block_storage/volume_tests.rb
Normal file
21
tests/hp/models/block_storage/volume_tests.rb
Normal 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
|
|
@ -2,12 +2,12 @@ Shindo.tests('Fog::BlockStorage[:hp] | volume requests', ['hp', 'block_storage']
|
|||
|
||||
@volume_format = {
|
||||
'status' => String,
|
||||
'displayDescription' => String,
|
||||
'displayDescription' => Fog::Nullable::String,
|
||||
'availabilityZone' => String,
|
||||
'displayName' => String,
|
||||
'displayName' => Fog::Nullable::String,
|
||||
'attachments' => [Fog::Nullable::Hash],
|
||||
'volumeType' => Fog::Nullable::String,
|
||||
'snapshotId' => String,
|
||||
'snapshotId' => Fog::Nullable::String,
|
||||
'size' => Integer,
|
||||
'id' => Integer,
|
||||
'createdAt' => String,
|
||||
|
|
Loading…
Reference in a new issue