Sha256: ce394c9830e8968b15363decf98a28d1efab52094d3da6e1bfffae8503a883e8

Contents?: true

Size: 1.2 KB

Versions: 36

Compression:

Stored size: 1.2 KB

Contents

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

  tests('success') do

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

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

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

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

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

  end

  tests('failure') do

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

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

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

  end

end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
fog-0.2.30 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.28 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.27 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.26 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.25 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.24 tests/rackspace/requests/servers/address_tests.rb
tecnh-fog-0.2.23.vpc tests/rackspace/requests/servers/address_tests.rb
fog-0.2.23 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.22 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.21 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.20 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.19 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.18 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.17 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.16 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.15 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.14 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.13 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.12 tests/rackspace/requests/servers/address_tests.rb
fog-0.2.11 tests/rackspace/requests/servers/address_tests.rb