Sha256: a25eae1cc4d99c768c79a0afac2618093cf237489abfed6d3db0d8527eb00a1b
Contents?: true
Size: 1.12 KB
Versions: 7
Compression:
Stored size: 1.12 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 begin Rackspace[:servers].reboot_server(0) false rescue Excon::Errors::NotFound true end end end end
Version data entries
7 entries across 7 versions & 1 rubygems