Sha256: d18b2126da8b73cfbc24257b5a2df4a5d8f24bacd45e9d26d65438cbaa9a48da

Contents?: true

Size: 914 Bytes

Versions: 13

Compression:

Stored size: 914 Bytes

Contents

Shindo.tests('Rackspace::Servers#delete_image', 'rackspace') do
  tests('success') do

    before do
      @server_id = Rackspace[:servers].create_server(1, 3, 'fogdeleteimage').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

13 entries across 13 versions & 1 rubygems

Version Path
fog-0.0.84 tests/rackspace/requests/servers/delete_image_tests.rb
fog-0.0.83 tests/rackspace/requests/servers/delete_image_tests.rb
fog-0.0.82 tests/rackspace/requests/servers/delete_image_tests.rb
fog-0.0.81 tests/rackspace/requests/servers/delete_image_tests.rb
fog-0.0.80 tests/rackspace/requests/servers/delete_image_tests.rb
fog-0.0.79 tests/rackspace/requests/servers/delete_image_tests.rb
fog-0.0.78 tests/rackspace/requests/servers/delete_image_tests.rb
fog-0.0.77 tests/rackspace/requests/servers/delete_image_tests.rb
fog-0.0.76 tests/rackspace/requests/servers/delete_image_tests.rb
fog-0.0.75 tests/rackspace/requests/servers/delete_image_tests.rb
fog-0.0.74 tests/rackspace/requests/servers/delete_image_tests.rb
fog-0.0.73 tests/rackspace/requests/servers/delete_image_tests.rb
fog-0.0.72 tests/rackspace/requests/servers/delete_image_tests.rb