Sha256: 9b7bbdfe09ebe16fc38742848e10ff8c9a3a95c2a48d3c4b0069bfe7d5ee6d82

Contents?: true

Size: 1.85 KB

Versions: 37

Compression:

Stored size: 1.85 KB

Contents

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

  tests('success') do
    before do
      @lb_pool = Fog::Network[:openstack].lb_pools.create(:subnet_id => 'subnet_id',
                                                          :protocol => 'HTTP',
                                                          :lb_method => 'ROUND_ROBIN')
    end

    after do
      @lb_pool.destroy
    end

    tests('#create').succeeds do
      @instance = Fog::Network[:openstack].lb_health_monitors.create(:type => 'PING',
                                                                     :delay => 1,
                                                                     :timeout => 5,
                                                                     :max_retries => 10,
                                                                     :http_method => 'GET',
                                                                     :url_path => '/',
                                                                     :expected_codes => '200, 201',
                                                                     :admin_state_up => true,
                                                                     :tenant_id => 'tenant_id')
      !@instance.id.nil?
    end

    tests('#update').succeeds do
      @instance.delay = 5
      @instance.timeout = 10
      @instance.max_retries = 20
      @instance.http_method = 'POST'
      @instance.url_path = '/varz'
      @instance.expected_codes = '200'
      @instance.admin_state_up = false
      @instance.update
    end

    tests('#associate_to_pool').succeeds do
      @instance.associate_to_pool(@lb_pool.id)
    end

    tests('#disassociate_from_pool').succeeds do
      @instance.disassociate_from_pool(@lb_pool.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-1.28.0 tests/openstack/models/network/lb_health_monitor_tests.rb
fog-1.27.0 tests/openstack/models/network/lb_health_monitor_tests.rb
fog-1.26.0 tests/openstack/models/network/lb_health_monitor_tests.rb
fog-1.25.0 tests/openstack/models/network/lb_health_monitor_tests.rb
nsidc-fog-1.24.1 tests/openstack/models/network/lb_health_monitor_tests.rb
fog-1.24.0 tests/openstack/models/network/lb_health_monitor_tests.rb
ns-fog-1.22.11 tests/openstack/models/network/lb_health_monitor_tests.rb
ns-fog-1.22.10 tests/openstack/models/network/lb_health_monitor_tests.rb
ns-fog-1.22.9 tests/openstack/models/network/lb_health_monitor_tests.rb
ns-fog-1.22.8 tests/openstack/models/network/lb_health_monitor_tests.rb
ns-fog-1.22.7 tests/openstack/models/network/lb_health_monitor_tests.rb
ns-fog-1.22.6 tests/openstack/models/network/lb_health_monitor_tests.rb
fog-1.23.0 tests/openstack/models/network/lb_health_monitor_tests.rb
ns-fog-1.22.4 tests/openstack/models/network/lb_health_monitor_tests.rb
ns-fog-1.22.3 tests/openstack/models/network/lb_health_monitor_tests.rb
ns-fog-1.22.2 tests/openstack/models/network/lb_health_monitor_tests.rb
fog-1.22.1 tests/openstack/models/network/lb_health_monitor_tests.rb