Sha256: bba93ea8872870a9ea7fd3f7386eeb96ee70b3d8448cf76d4de9df91e5005256

Contents?: true

Size: 1.62 KB

Versions: 91

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

91 entries across 91 versions & 9 rubygems

Version Path
fog-1.38.0 tests/hp/requests/compute/server_address_tests.rb
fog-1.37.0 tests/hp/requests/compute/server_address_tests.rb
fog-1.36.0 tests/hp/requests/compute/server_address_tests.rb
fog-1.35.0 tests/hp/requests/compute/server_address_tests.rb
fog-2.0.0.pre.0 tests/hp/requests/compute/server_address_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/hp/requests/compute/server_address_tests.rb
fog-1.34.0 tests/hp/requests/compute/server_address_tests.rb
fog-1.33.0 tests/hp/requests/compute/server_address_tests.rb
fog-1.32.0 tests/hp/requests/compute/server_address_tests.rb
fog-1.31.0 tests/hp/requests/compute/server_address_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/hp/requests/compute/server_address_tests.rb
fog-1.30.0 tests/hp/requests/compute/server_address_tests.rb
fog-1.29.0 tests/hp/requests/compute/server_address_tests.rb
fog-1.28.0 tests/hp/requests/compute/server_address_tests.rb
fog-1.27.0 tests/hp/requests/compute/server_address_tests.rb
fog-1.26.0 tests/hp/requests/compute/server_address_tests.rb
fog-1.25.0 tests/hp/requests/compute/server_address_tests.rb
nsidc-fog-1.24.1 tests/hp/requests/compute/server_address_tests.rb
fog-1.24.0 tests/hp/requests/compute/server_address_tests.rb
ns-fog-1.22.11 tests/hp/requests/compute/server_address_tests.rb