From a4c7cc460a19094bbcd139b46dfb6581001bfec3 Mon Sep 17 00:00:00 2001 From: Sergio Rubio Date: Mon, 18 Mar 2013 14:05:03 +0100 Subject: [PATCH] [digitalocean|compute] power state tests fixes --- tests/digitalocean/requests/compute/power_state_tests.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/digitalocean/requests/compute/power_state_tests.rb b/tests/digitalocean/requests/compute/power_state_tests.rb index 8a9e7f867..f062258d5 100644 --- a/tests/digitalocean/requests/compute/power_state_tests.rb +++ b/tests/digitalocean/requests/compute/power_state_tests.rb @@ -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] server = fog_test_server @@ -6,6 +7,7 @@ Shindo.tests('Fog::Compute[:digitalocean] | reboot_server request', ['digitaloce tests('success') do test('#power_off_server') do + server.wait_for(120) { ready? } service.power_off_server(server.id) server.wait_for(120) { !ready? } server.status == 'off' @@ -19,7 +21,7 @@ Shindo.tests('Fog::Compute[:digitalocean] | reboot_server request', ['digitaloce test('#shutdown_server') do service.shutdown_server server.id - server.wait_for(120) { status == 'off' } + server.wait_for(120) { !ready? } server.status == 'off' end