Sha256: 214e54c017c1bf52edf2347baf30c12902fd7dfb0c45bbc62b6896d9d5f7685e

Contents?: true

Size: 1.18 KB

Versions: 39

Compression:

Stored size: 1.18 KB

Contents

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

  @service = Fog::Compute.new(:provider => :rackspace, :version => :v1)

  tests('success') do

    @server = @service.servers.create(:flavor_id => 1, :image_id => 19)

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

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

    tests("#list_public_addresses(#{@server.id})").formats({'public' => [String]}) do
      @service.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
      @service.list_addresses(0)
    end

    tests('#list_private_addresses(0)').raises(Fog::Compute::Rackspace::NotFound) do
      @service.list_private_addresses(0)
    end

    tests('#list_public_addresses(0)').raises(Fog::Compute::Rackspace::NotFound) do
      @service.list_public_addresses(0)
    end

  end

end

Version data entries

39 entries across 37 versions & 6 rubygems

Version Path
fog-rackspace-0.1.6 tests/rackspace/requests/compute/address_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-rackspace-0.1.5/tests/rackspace/requests/compute/address_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-rackspace-0.1.5/tests/rackspace/requests/compute/address_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-rackspace-0.1.5/tests/rackspace/requests/compute/address_tests.rb
fog-rackspace-0.1.5 tests/rackspace/requests/compute/address_tests.rb
fog-rackspace-0.1.4 tests/rackspace/requests/compute/address_tests.rb
fog-rackspace-0.1.3 tests/rackspace/requests/compute/address_tests.rb
fog-rackspace-0.1.2 tests/rackspace/requests/compute/address_tests.rb
fog-rackspace-0.1.1 tests/rackspace/requests/compute/address_tests.rb
fog-rackspace-0.1.0 tests/rackspace/requests/compute/address_tests.rb
fog-1.37.0 tests/rackspace/requests/compute/address_tests.rb
fog-1.36.0 tests/rackspace/requests/compute/address_tests.rb
fog-1.35.0 tests/rackspace/requests/compute/address_tests.rb
fog-2.0.0.pre.0 tests/rackspace/requests/compute/address_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/rackspace/requests/compute/address_tests.rb
fog-1.34.0 tests/rackspace/requests/compute/address_tests.rb
fog-1.33.0 tests/rackspace/requests/compute/address_tests.rb
fog-1.32.0 tests/rackspace/requests/compute/address_tests.rb
fog-1.31.0 tests/rackspace/requests/compute/address_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/rackspace/requests/compute/address_tests.rb