1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[digitalocean|compute] power state tests fixes

This commit is contained in:
Sergio Rubio 2013-03-18 14:05:03 +01:00
parent e99e66cf13
commit a4c7cc460a

View file

@ -1,4 +1,5 @@
Shindo.tests('Fog::Compute[:digitalocean] | reboot_server request', ['digitalocean', 'compute']) do Shindo.tests('Fog::Compute[:digitalocean] | power on/off/shutdown requests',
['digitalocean', 'compute']) do
service = Fog::Compute[:digitalocean] service = Fog::Compute[:digitalocean]
server = fog_test_server server = fog_test_server
@ -6,6 +7,7 @@ Shindo.tests('Fog::Compute[:digitalocean] | reboot_server request', ['digitaloce
tests('success') do tests('success') do
test('#power_off_server') do test('#power_off_server') do
server.wait_for(120) { ready? }
service.power_off_server(server.id) service.power_off_server(server.id)
server.wait_for(120) { !ready? } server.wait_for(120) { !ready? }
server.status == 'off' server.status == 'off'
@ -19,7 +21,7 @@ Shindo.tests('Fog::Compute[:digitalocean] | reboot_server request', ['digitaloce
test('#shutdown_server') do test('#shutdown_server') do
service.shutdown_server server.id service.shutdown_server server.id
server.wait_for(120) { status == 'off' } server.wait_for(120) { !ready? }
server.status == 'off' server.status == 'off'
end end