Sha256: c8162cf47aa32f46d5fb1d2d651ab30370e0cb73c325a87f8bb31c87a9e8861f

Contents?: true

Size: 1.21 KB

Versions: 45

Compression:

Stored size: 1.21 KB

Contents

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

  tests('success') do

    @server = Fog::Compute[:rackspace].servers.create(:flavor_id => 1, :image_id => 19)

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

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

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

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

  end

  tests('failure') do

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

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

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

  end

end

Version data entries

45 entries across 45 versions & 14 rubygems

Version Path
fog-nirvanix-1.8.2 tests/rackspace/requests/compute/address_tests.rb
fog-nirvanix-1.8.1 tests/rackspace/requests/compute/address_tests.rb
fog-parser-fix-1.6.1 tests/rackspace/requests/compute/address_tests.rb
fog-test-again-1.6.0 tests/rackspace/requests/compute/address_tests.rb
fog-parser-fix-1.6.0 tests/rackspace/requests/compute/address_tests.rb
fog-sgonyea-1.8.1 tests/rackspace/requests/compute/address_tests.rb
fog-1.8.0 tests/rackspace/requests/compute/address_tests.rb
fog-maestrodev-1.7.0.20121114190951 tests/rackspace/requests/compute/address_tests.rb
fog-1.7.0 tests/rackspace/requests/compute/address_tests.rb
fog-1.6.0 tests/rackspace/requests/compute/address_tests.rb
fog-1.5.0 tests/rackspace/requests/compute/address_tests.rb
rackspace-fog-1.4.2 tests/rackspace/requests/compute/address_tests.rb
fog-1.4.0 tests/rackspace/requests/compute/address_tests.rb
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/tests/rackspace/requests/compute/address_tests.rb
michiels-fog-1.3.1 tests/rackspace/requests/compute/address_tests.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/tests/rackspace/requests/compute/address_tests.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/tests/rackspace/requests/compute/address_tests.rb
fog-1.3.1 tests/rackspace/requests/compute/address_tests.rb
fog-1.3.0 tests/rackspace/requests/compute/address_tests.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/tests/rackspace/requests/compute/address_tests.rb