Sha256: 0feb0d3a73e8b7a0e13ef96b5a9f5dd635a12f470467c0a449c269a50a34bf0a

Contents?: true

Size: 1.17 KB

Versions: 20

Compression:

Stored size: 1.17 KB

Contents

Shindo.tests('Rackspace::Compute | address requests', ['rackspace']) do

  tests('success') do

    @server = Rackspace[:compute].servers.create(:flavor_id => 1, :image_id => 19)

    tests("#list_addresses(#{@server.id})").formats({'addresses' => {'private' => [String], 'public' => [String]}}) do
      Rackspace[:compute].list_addresses(@server.id).body
    end

    tests("#list_private_addresses(#{@server.id})").formats({'private' => [String]}) do
      Rackspace[:compute].list_private_addresses(@server.id).body
    end

    tests("#list_public_addresses(#{@server.id})").formats({'public' => [String]}) do
      Rackspace[:compute].list_public_addresses(@server.id).body
    end

    @server.wait_for { ready? }
    @server.destroy

  end

  tests('failure') do

    tests('#list_addresses(0)').raises(Fog::Rackspace::Compute::NotFound) do
      Rackspace[:compute].list_addresses(0)
    end

    tests('#list_private_addresses(0)').raises(Fog::Rackspace::Compute::NotFound) do
      Rackspace[:compute].list_private_addresses(0)
    end

    tests('#list_public_addresses(0)').raises(Fog::Rackspace::Compute::NotFound) do
      Rackspace[:compute].list_public_addresses(0)
    end

  end

end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
fog-0.8.2 tests/compute/requests/rackspace/address_tests.rb
fog-0.8.1 tests/compute/requests/rackspace/address_tests.rb
fog-0.8.0 tests/compute/requests/rackspace/address_tests.rb
fog-0.7.2 tests/compute/requests/rackspace/address_tests.rb
fog-0.7.1 tests/compute/requests/rackspace/address_tests.rb
fog-0.7.0 tests/compute/requests/rackspace/address_tests.rb
fog-0.6.0 tests/compute/requests/rackspace/address_tests.rb
fog-0.5.3 tests/compute/requests/rackspace/address_tests.rb
fog-0.5.2 tests/compute/requests/rackspace/address_tests.rb
fog-0.5.1 tests/compute/requests/rackspace/address_tests.rb
fog-0.5.0 tests/compute/requests/rackspace/address_tests.rb
phpfog-fog-0.4.1.3 tests/compute/requests/rackspace/address_tests.rb
phpfog-fog-0.4.1.2 tests/compute/requests/rackspace/address_tests.rb
phpfog-fog-0.4.1.1 tests/compute/requests/rackspace/address_tests.rb
phpfog-fog-0.4.1 tests/compute/requests/rackspace/address_tests.rb
fog-0.4.1 tests/compute/requests/rackspace/address_tests.rb
fog-0.4.0 tests/compute/requests/rackspace/address_tests.rb
fog-0.3.34 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.33 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.32 tests/rackspace/requests/compute/address_tests.rb