1
0
Fork 0
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:
Decklin Foster 2012-02-29 15:08:02 -05:00
parent e558945dfb
commit 518bb3c7a0
3 changed files with 3 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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