Sha256: 1efec945a1e3ab336b7129abd7786ce4f46736c08a98406de966cf6bb3b8f7ad

Contents?: true

Size: 1.2 KB

Versions: 32

Compression:

Stored size: 1.2 KB

Contents

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

  tests('success') do

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

    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

32 entries across 32 versions & 1 rubygems

Version Path
fog-0.3.31 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.30 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.29 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.28 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.27 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.26 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.25 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.24 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.23 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.22 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.21 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.20 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.19 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.18 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.17 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.16 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.15 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.14 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.13 tests/rackspace/requests/compute/address_tests.rb
fog-0.3.12 tests/rackspace/requests/compute/address_tests.rb