Sha256: f50262cdf347eacc65db35b55bfa8de47ca19955ed45cfddfc64a3d68e9a1e5f
Contents?: true
Size: 1.09 KB
Versions: 10
Compression:
Stored size: 1.09 KB
Contents
Shindo.tests('Rackspace::Servers#reboot_server', 'rackspace') do tests('success') do before do @server_id = Rackspace[:servers].create_server(1, 3, 'fogrebootserver').body['server']['id'] end after do Fog.wait_for { Rackspace[:servers].get_server_details(@server_id).body['server']['status'] == 'ACTIVE' } Rackspace[:servers].delete_server(@server_id) end tests('HARD') do test('has proper output format') do Fog.wait_for { Rackspace[:servers].get_server_details(@server_id).body['server']['status'] == 'ACTIVE' } Rackspace[:servers].reboot_server(@server_id, 'HARD') end end tests('SOFT') do test('has proper output format') do Fog.wait_for { Rackspace[:servers].get_server_details(@server_id).body['server']['status'] == 'ACTIVE' } Rackspace[:servers].reboot_server(@server_id, 'SOFT') end end end tests('failure') do test('raises NotFound error if server does not exist') do has_error(Excon::Errors::NotFound) do Rackspace[:servers].reboot_server(0) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems