Sha256: 5c84399c2df0869564149959e5fd5535c243c7f1f14cb2af6262c1a336834513

Contents?: true

Size: 1023 Bytes

Versions: 5

Compression:

Stored size: 1023 Bytes

Contents

Shindo.tests("Fog::Network[:openstack] | floating_ip", ['openstack']) do

  tests('success') do

    tests('#create').succeeds do
      @instance = Fog::Network[:openstack].floating_ips.create(:floating_network_id => 'f0000000-0000-0000-0000-000000000000')

      !@instance.id.nil?
    end

    tests('#update').succeeds do
      @instance.port_id = 'p0000000-0000-0000-0000-000000000000'
      @instance.update
    end

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

    tests('#associate').succeeds do
      port_id = 'p0000000-0000-0000-0000-000000000000'
      fixed_ip_address = '8.8.8.8'
      @instance.associate(port_id, fixed_ip_address)
      returns(port_id) { @instance.port_id }
      returns(fixed_ip_address) { @instance.fixed_ip_address }
    end

    tests('#disassociate').succeeds do
      fixed_ip_address = '8.8.8.8'
      @instance.disassociate(fixed_ip_address)
      returns(nil) { @instance.port_id }
      returns(nil) { @instance.fixed_ip_address }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fog-openstack-0.1.7 tests/openstack/models/network/floating_ip_tests.rb
fog-openstack-0.1.6 tests/openstack/models/network/floating_ip_tests.rb
fog-openstack-0.1.5 tests/openstack/models/network/floating_ip_tests.rb
fog-openstack-0.1.4 tests/openstack/models/network/floating_ip_tests.rb
fog-openstack-0.1.3 tests/openstack/models/network/floating_ip_tests.rb