Sha256: 482b0f43cb86f0bb189b83dde2596608e9222f735b51d9ce5a72d5b13d3d9c1f

Contents?: true

Size: 1.85 KB

Versions: 37

Compression:

Stored size: 1.85 KB

Contents

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

  tests('success') do
    before do
      @lb_health_monitor =  Fog::Network[:openstack].lb_health_monitors.create(:type => 'PING',
                                                                               :delay => 1,
                                                                               :timeout => 5,
                                                                               :max_retries => 10)
    end

    after do
      @lb_health_monitor.destroy
    end

    tests('#create').succeeds do
      @instance = Fog::Network[:openstack].lb_pools.create(:subnet_id => 'subnet_id',
                                                           :protocol => 'HTTP',
                                                           :lb_method => 'ROUND_ROBIN',
                                                           :name => 'test-pool',
                                                           :description => 'Test Pool',
                                                           :admin_state_up => true,
                                                           :tenant_id => 'tenant_id')
      !@instance.id.nil?
    end

    tests('#update').succeeds do
      @instance.name = 'new-test-pool'
      @instance.description = 'New Test Pool'
      @instance.lb_method = 'LEAST_CONNECTIONS'
      @instance.admin_state_up = false
      @instance.update
    end

    tests('#stats').succeeds do
      @instance.stats
      !@instance.active_connections.nil?
    end

    tests('#associate_health_monitor').succeeds do
      @instance.associate_health_monitor(@lb_health_monitor.id)
    end

    tests('#disassociate_health_monitor').succeeds do
      @instance.disassociate_health_monitor(@lb_health_monitor.id)
    end

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

  end

end

Version data entries

37 entries across 37 versions & 5 rubygems

Version Path
fog-openstack-0.1.7 tests/openstack/models/network/lb_pool_tests.rb
fog-openstack-0.1.6 tests/openstack/models/network/lb_pool_tests.rb
fog-openstack-0.1.5 tests/openstack/models/network/lb_pool_tests.rb
fog-openstack-0.1.4 tests/openstack/models/network/lb_pool_tests.rb
fog-openstack-0.1.3 tests/openstack/models/network/lb_pool_tests.rb
fog-openstack-0.1.2 tests/openstack/models/network/lb_pool_tests.rb
fog-openstack-0.1.1 tests/openstack/models/network/lb_pool_tests.rb
fog-openstack-0.1.0 tests/openstack/models/network/lb_pool_tests.rb
fog-1.37.0 tests/openstack/models/network/lb_pool_tests.rb
fog-1.36.0 tests/openstack/models/network/lb_pool_tests.rb
fog-1.35.0 tests/openstack/models/network/lb_pool_tests.rb
fog-2.0.0.pre.0 tests/openstack/models/network/lb_pool_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/openstack/models/network/lb_pool_tests.rb
fog-1.34.0 tests/openstack/models/network/lb_pool_tests.rb
fog-1.33.0 tests/openstack/models/network/lb_pool_tests.rb
fog-1.32.0 tests/openstack/models/network/lb_pool_tests.rb
fog-1.31.0 tests/openstack/models/network/lb_pool_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/openstack/models/network/lb_pool_tests.rb
fog-1.30.0 tests/openstack/models/network/lb_pool_tests.rb
fog-1.29.0 tests/openstack/models/network/lb_pool_tests.rb