mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ibm] Wait for instance to be ready before deleting it or creating image
This commit is contained in:
parent
e558945dfb
commit
518bb3c7a0
3 changed files with 3 additions and 0 deletions
|
@ -24,6 +24,7 @@ Shindo.tests('Fog::Storage[:ibm] | volume', ['ibm']) do
|
|||
tests('Fog::Storage::IBM::Volume#save') do
|
||||
returns(true) { @volume.save }
|
||||
returns(String) { @volume.id.class }
|
||||
@volume.wait_for { ready? }
|
||||
@volume_id = @volume.id
|
||||
end
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ Shindo.tests('Fog::Compute[:ibm] | image requests', ['ibm']) do
|
|||
:key_name => @key_name
|
||||
).body
|
||||
@instance_id = response['instances'][0]['id']
|
||||
Fog::Compute[:ibm].servers.get(@instance_id).wait_for(1200) { ready? }
|
||||
data = Fog::Compute[:ibm].create_image(@instance_id, @image_name, "").body
|
||||
@id = data['id']
|
||||
data
|
||||
|
|
|
@ -73,6 +73,7 @@ Shindo.tests('Fog::Compute[:ibm] | instance requests', ['ibm']) do
|
|||
end
|
||||
|
||||
tests("#delete_instance('#{@instance_id}')") do
|
||||
Fog::Compute[:ibm].servers.get(@instance_id).wait_for { ready? }
|
||||
data = Fog::Compute[:ibm].delete_instance(@instance_id)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue