1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/digitalocean/requests/compute/power_state_tests.rb
Sergio Rubio 5e9034115b [digitalocean|compute] power_state_tests fixes
Do not wait for the server to be ready before running the tests since
the server may be powered off.
2013-03-31 22:16:13 +02:00

25 lines
569 B
Ruby

Shindo.tests('Fog::Compute[:digitalocean] | power on/off/shutdown requests',
['digitalocean', 'compute']) do
service = Fog::Compute[:digitalocean]
server = fog_test_server
tests('success') do
test('#power_off_server') do
service.power_off_server(server.id).body['status'] == 'OK'
end
test('#power_on_server') do
service.power_on_server(server.id).body['status'] == 'OK'
end
test('#shutdown_server') do
service.shutdown_server(server.id).body['status'] == 'OK'
end
server.start
end
end