Sha256: 896257220be89d0e5e058336b8e00dd69b5fb5a6fd98795deac905b46d4500f0
Contents?: true
Size: 915 Bytes
Versions: 4
Compression:
Stored size: 915 Bytes
Contents
Shindo.tests('Rackspace::Servers#delete_image', 'rackspace') do tests('success') do before do @server_id = Rackspace[:servers].create_server(1, 3, 'fogcreateserver').body['server']['id'] @image_id = Rackspace[:servers].create_image(@server_id).body['image']['id'] end after do wait_for { Rackspace[:servers].get_server_details(@server_id).body['server']['status'] == 'ACTIVE' } Rackspace[:servers].delete_server(@server_id) end test('has proper output format') do wait_for { Rackspace[:servers].get_image_details(@image_id).body['image']['status'] == 'ACTIVE' } Rackspace[:servers].delete_image(@image_id) end end tests('failure') do test('raises NotFound error if image does not exist') do begin Rackspace[:servers].delete_image(0) false rescue Excon::Errors::NotFound true end end end end
Version data entries
4 entries across 4 versions & 1 rubygems