mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ibm] Return pending if provisioning times out in the real tests
This commit is contained in:
parent
d257bcae45
commit
79b3636298
2 changed files with 20 additions and 9 deletions
|
@ -21,10 +21,16 @@ Shindo.tests('Fog::Compute[:ibm] | servers', ['ibm']) do
|
|||
returns(@instance_id) { @server.id }
|
||||
end
|
||||
|
||||
@server.wait_for(Fog::IBM::TIMEOUT) { ready? }
|
||||
@server.destroy
|
||||
@key.wait_for(Fog::IBM::TIMEOUT) { instance_ids.empty? }
|
||||
@key.destroy
|
||||
if @server.wait_for(Fog::IBM::TIMEOUT) { ready? }
|
||||
@server.destroy
|
||||
else
|
||||
pending
|
||||
end
|
||||
if @key.wait_for(Fog::IBM::TIMEOUT) { instance_ids.empty? }
|
||||
@key.destroy
|
||||
else
|
||||
pending
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -73,14 +73,19 @@ Shindo.tests('Fog::Compute[:ibm] | instance requests', ['ibm']) do
|
|||
returns(@expiration_time) { Fog::Compute[:ibm].modify_instance(@instance_id, 'expirationTime' => @expiration_time).body["expirationTime"] }
|
||||
end
|
||||
|
||||
Fog::Compute[:ibm].servers.get(@instance_id).wait_for(Fog::IBM::TIMEOUT) { ready? }
|
||||
|
||||
tests("#delete_instance('#{@instance_id}')") do
|
||||
data = Fog::Compute[:ibm].delete_instance(@instance_id)
|
||||
if Fog::Compute[:ibm].servers.get(@instance_id).wait_for(Fog::IBM::TIMEOUT) { ready? }
|
||||
data = Fog::Compute[:ibm].delete_instance(@instance_id)
|
||||
else
|
||||
pending
|
||||
end
|
||||
end
|
||||
|
||||
@key.wait_for(Fog::IBM::TIMEOUT) { instance_ids.empty? }
|
||||
@key.destroy
|
||||
if @key.wait_for(Fog::IBM::TIMEOUT) { instance_ids.empty? }
|
||||
@key.destroy
|
||||
else
|
||||
pending
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue