mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Fixes some bugs found in GCE examples
This commit is contained in:
parent
d845cd776f
commit
ef34245400
2 changed files with 9 additions and 5 deletions
|
@ -22,7 +22,7 @@ def test
|
|||
:username => 'root',
|
||||
:metadata => {'foo' => 'bar'}
|
||||
})
|
||||
sleep(30)
|
||||
sleep(90)
|
||||
|
||||
raise "Could not reload created server." unless server.reload
|
||||
raise "Could not create sshable server." unless server.ssh("whoami")
|
||||
|
|
|
@ -2,7 +2,7 @@ def test
|
|||
connection = Fog::Compute.new({ :provider => "Google" })
|
||||
time = Time.now.utc.to_i
|
||||
disk = connection.disks.create({
|
||||
:name => 'foggydisk',
|
||||
:name => "foggydisk-#{time}",
|
||||
:size_gb => 10,
|
||||
:zone_name => 'us-central1-a',
|
||||
:source_image => 'centos-6-v20131120',
|
||||
|
@ -19,7 +19,11 @@ def test
|
|||
|
||||
server = connection.servers.bootstrap params
|
||||
|
||||
raise "Could not bootstrap sshable server." unless server.ssh("whoami")
|
||||
raise "Could not delete server." unless server.destroy
|
||||
raise "Could not delete disk." unless disk.destroy
|
||||
begin
|
||||
raise "Could not bootstrap sshable server." unless server.ssh("whoami")
|
||||
raise "Could not delete server." unless server.destroy
|
||||
raise "Could not delete disk." unless disk.destroy
|
||||
rescue Exception => e
|
||||
p e.message
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue