mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ibm] Don't calculate expiration time until ready to make the request
This commit is contained in:
parent
dc0e4e5ab8
commit
cb47ec8fc6
1 changed files with 2 additions and 1 deletions
|
@ -40,7 +40,6 @@ Shindo.tests('Fog::Compute[:ibm] | instance requests', ['ibm']) do
|
||||||
@image_id = "20010001"
|
@image_id = "20010001"
|
||||||
@instance_type = "COP32.1/2048/60"
|
@instance_type = "COP32.1/2048/60"
|
||||||
@location = "41"
|
@location = "41"
|
||||||
@expiration_time= (Time.now.to_i + 10) * 1000
|
|
||||||
@key_name = "fog-test-key-" + Time.now.to_i.to_s(32)
|
@key_name = "fog-test-key-" + Time.now.to_i.to_s(32)
|
||||||
@key = Fog::Compute[:ibm].keys.create(:name => @key_name)
|
@key = Fog::Compute[:ibm].keys.create(:name => @key_name)
|
||||||
|
|
||||||
|
@ -68,6 +67,8 @@ Shindo.tests('Fog::Compute[:ibm] | instance requests', ['ibm']) do
|
||||||
returns(true) { Fog::Compute[:ibm].modify_instance(@instance_id, 'name' => @name + " 2").body["success"] }
|
returns(true) { Fog::Compute[:ibm].modify_instance(@instance_id, 'name' => @name + " 2").body["success"] }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@expiration_time = (Time.now.to_i + 10) * 1000
|
||||||
|
|
||||||
tests("#modify_instance('#{@instance_id}', 'expirationTime' => '#{@expiration_time}')") do
|
tests("#modify_instance('#{@instance_id}', 'expirationTime' => '#{@expiration_time}')") do
|
||||||
returns(@expiration_time) { Fog::Compute[:ibm].modify_instance(@instance_id, 'expirationTime' => @expiration_time).body["expirationTime"] }
|
returns(@expiration_time) { Fog::Compute[:ibm].modify_instance(@instance_id, 'expirationTime' => @expiration_time).body["expirationTime"] }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue