Sha256: bef2aa64a3059d0a423699fbc6c0f51cde29b50e2cc71cd229fe8f8c414235c5

Contents?: true

Size: 1005 Bytes

Versions: 18

Compression:

Stored size: 1005 Bytes

Contents

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

  model_tests(Fog::Compute[:aws].addresses, {}, true) do

    @server = Fog::Compute[:aws].servers.create
    @server.wait_for { ready? }

    tests('#server=').succeeds do
      @instance.server = @server
    end

    tests('#server') do
      test(' == @server') do
        @server.reload
        @instance.server.public_ip_address == @instance.public_ip
      end
    end

    tests("#change_scope") do
      test('to vpc') do
        @instance.change_scope
        @instance.domain == 'vpc'
      end

      test('to classic') do
        @instance.change_scope
        @instance.domain == 'standard'
      end

      # merge_attributes requires this
      @instance = Fog::Compute[:aws].addresses.get(@instance.identity)
    end

    @server.destroy

  end

  model_tests(Fog::Compute[:aws].addresses, { :domain => "vpc" }, true) do
    tests("#change_scope").raises(Fog::AWS::Compute::Error) do
      @instance.change_scope
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
fog-aws-3.12.0 tests/models/compute/address_tests.rb
fog-aws-3.11.0 tests/models/compute/address_tests.rb
fog-aws-3.10.0 tests/models/compute/address_tests.rb
fog-aws-3.9.0 tests/models/compute/address_tests.rb
fog-aws-3.8.0 tests/models/compute/address_tests.rb
fog-aws-3.7.0 tests/models/compute/address_tests.rb
fog-aws-3.6.7 tests/models/compute/address_tests.rb
fog-aws-3.6.6 tests/models/compute/address_tests.rb
fog-aws-3.6.5 tests/models/compute/address_tests.rb
fog-aws-3.6.4 tests/models/compute/address_tests.rb
fog-aws-3.6.3 tests/models/compute/address_tests.rb
fog-aws-3.6.2 tests/models/compute/address_tests.rb
fog-aws-3.5.2 tests/models/compute/address_tests.rb
fog-aws-3.5.1 tests/models/compute/address_tests.rb
fog-aws-3.5.0 tests/models/compute/address_tests.rb
fog-aws-3.4.0 tests/models/compute/address_tests.rb
fog-aws-3.3.0 tests/models/compute/address_tests.rb
fog-aws-3.2.0 tests/models/compute/address_tests.rb