Sha256: ff4bb27876c71b3ee36326abedbe68dd58c3c9b7bc199ccb46e8d684cb8902a6

Contents?: true

Size: 1.62 KB

Versions: 14

Compression:

Stored size: 1.62 KB

Contents

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

  @base_image_id = ENV["BASE_IMAGE_ID"] || 1242

  tests('success') do
    @server = Fog::Compute[:hp].servers.create(:name => 'fogaddresstests', :flavor_id => 100, :image_id => @base_image_id)
    @server.wait_for { ready? }
    @address = Fog::Compute[:hp].addresses.create
    @address.server = @server

    # the network name is currently named 'private'
    tests("#list_server_addresses(#{@server.id})").formats({'addresses' => {"private" => [{'version' => Integer, 'addr' => String}]}}) do
      Fog::Compute[:hp].list_server_addresses(@server.id).body
    end

    tests("#list_server_private_addresses(#{@server.id}, 'private')").formats({'private' => [{'version' => Integer, 'addr' => String}]}) do
      Fog::Compute[:hp].list_server_private_addresses(@server.id, 'private').body
    end

    tests("#list_server_public_addresses(#{@server.id}, 'private')").formats({'public' => [{'version' => Integer, 'addr' => String}]}) do
      Fog::Compute[:hp].list_server_public_addresses(@server.id, 'private').body
    end

    @address.destroy
    @server.destroy

  end

  tests('failure') do

    tests("#list_server_addresses(0)").raises(Fog::Compute::HP::NotFound) do
      Fog::Compute[:hp].list_server_addresses(0)
    end

    tests("#list_server_private_addresses(0, 'private')").raises(Fog::Compute::HP::NotFound) do
      Fog::Compute[:hp].list_server_private_addresses(0, 'private')
    end

    tests("#list_server_public_addresses(0, 'private')").raises(Fog::Compute::HP::NotFound) do
      Fog::Compute[:hp].list_server_public_addresses(0, 'private')
    end

  end

end

Version data entries

14 entries across 14 versions & 6 rubygems

Version Path
fog-nirvanix-1.8.2 tests/hp/requests/compute/server_address_tests.rb
fog-nirvanix-1.8.1 tests/hp/requests/compute/server_address_tests.rb
fog-parser-fix-1.6.1 tests/hp/requests/compute/server_address_tests.rb
fog-test-again-1.6.0 tests/hp/requests/compute/server_address_tests.rb
fog-parser-fix-1.6.0 tests/hp/requests/compute/server_address_tests.rb
fog-1.9.0 tests/hp/requests/compute/server_address_tests.rb
fog-maestrodev-1.8.0.20130114204828 tests/hp/requests/compute/server_address_tests.rb
fog-maestrodev-1.8.0.20130111070250 tests/hp/requests/compute/server_address_tests.rb
fog-maestrodev-1.8.0.20130109172219 tests/hp/requests/compute/server_address_tests.rb
fog-sgonyea-1.8.1 tests/hp/requests/compute/server_address_tests.rb
fog-1.8.0 tests/hp/requests/compute/server_address_tests.rb
fog-maestrodev-1.7.0.20121114190951 tests/hp/requests/compute/server_address_tests.rb
fog-1.7.0 tests/hp/requests/compute/server_address_tests.rb
fog-1.6.0 tests/hp/requests/compute/server_address_tests.rb