1
0
Fork 0
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:
Decklin Foster 2012-03-12 15:27:49 -04:00
parent dc0e4e5ab8
commit cb47ec8fc6

View file

@ -40,7 +40,6 @@ Shindo.tests('Fog::Compute[:ibm] | instance requests', ['ibm']) do
@image_id = "20010001"
@instance_type = "COP32.1/2048/60"
@location = "41"
@expiration_time= (Time.now.to_i + 10) * 1000
@key_name = "fog-test-key-" + Time.now.to_i.to_s(32)
@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"] }
end
@expiration_time = (Time.now.to_i + 10) * 1000
tests("#modify_instance('#{@instance_id}', 'expirationTime' => '#{@expiration_time}')") do
returns(@expiration_time) { Fog::Compute[:ibm].modify_instance(@instance_id, 'expirationTime' => @expiration_time).body["expirationTime"] }
end