2013-03-18 09:05:03 -04:00
|
|
|
Shindo.tests('Fog::Compute[:digitalocean] | power on/off/shutdown requests',
|
|
|
|
['digitalocean', 'compute']) do
|
2013-02-26 14:09:45 -05:00
|
|
|
|
|
|
|
service = Fog::Compute[:digitalocean]
|
|
|
|
server = fog_test_server
|
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
|
|
|
test('#power_off_server') do
|
2013-03-18 10:06:01 -04:00
|
|
|
service.power_off_server(server.id).body['status'] == 'OK'
|
2013-02-26 14:09:45 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
test('#power_on_server') do
|
2013-03-18 10:06:01 -04:00
|
|
|
service.power_on_server(server.id).body['status'] == 'OK'
|
2013-02-26 14:09:45 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
test('#shutdown_server') do
|
2013-03-18 10:06:01 -04:00
|
|
|
service.shutdown_server(server.id).body['status'] == 'OK'
|
2013-02-26 14:09:45 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
server.start
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|