mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Need to wait for imaging to complete.
This commit is contained in:
parent
858b561cea
commit
cfca6798d7
2 changed files with 20 additions and 0 deletions
|
@ -38,6 +38,16 @@ Shindo.tests('Fog::Compute[:serverlove] | drive requests', ['serverlove']) do
|
|||
Fog::Compute[:serverlove].images.get(@image['drive']).imaging != "" # This will be "x%" when imaging
|
||||
end
|
||||
|
||||
tests("waits for imaging...").returns(true) do
|
||||
while(percent_complete = Fog::Compute[:serverlove].images.get(@image['drive']).imaging)
|
||||
sleep(1)
|
||||
STDERR.print "#{percent_complete} "
|
||||
break if percent_complete.include?("100")
|
||||
end
|
||||
STDERR.print "100% "
|
||||
true
|
||||
end
|
||||
|
||||
tests("#destroy_image").succeeds do
|
||||
Fog::Compute[:serverlove].destroy_image(@image['drive'])
|
||||
end
|
||||
|
|
|
@ -41,6 +41,16 @@ Shindo.tests('Fog::Compute[:serverlove] | server requests', ['serverlove']) do
|
|||
Fog::Compute[:serverlove].update_server(@server['server'], { 'ide:0:0' => @image['drive'], 'boot' => 'ide:0:0'})
|
||||
end
|
||||
|
||||
tests("waits for imaging...").returns(true) do
|
||||
while(percent_complete = Fog::Compute[:serverlove].images.get(@image['drive']).imaging)
|
||||
sleep(1)
|
||||
STDERR.print "#{percent_complete} "
|
||||
break if percent_complete.include?("100")
|
||||
end
|
||||
STDERR.print "100% "
|
||||
true
|
||||
end
|
||||
|
||||
tests("#start_server").returns(true) do
|
||||
Fog::Compute[:serverlove].start_server(@server['server'])
|
||||
Fog::Compute[:serverlove].servers.get(@server['server']).status == "active"
|
||||
|
|
Loading…
Reference in a new issue