Sha256: b3b28d1961752188a440c4a8d01a0e1af71b42f3e6c098c99cd17d3da9d47d45

Contents?: true

Size: 1.17 KB

Versions: 16

Compression:

Stored size: 1.17 KB

Contents

class TestLoadBalancerPool < TestYaoResource
  def test_loadbalancer_pool
    params = {
      "lb_algorithm" => "ROUND_ROBIN",
      "protocol" => "HTTP",
      "description" => "My round robin pool",
      "admin_state_up" => true,
      "created_at" => "2017-04-13T18:14:44",
      "provisioning_status" => "ACTIVE",
      "updated_at" => "2017-04-13T23:08:12",
      "session_persistence" => {
        "cookie_name" => nil,
        "type" => "SOURCE_IP"
      },
      "operating_status" => "ONLINE",
      "name" => "round_robin_pool"
    }

    pool = Yao::Resources::LoadBalancerPool.new(params)
    assert_equal("ROUND_ROBIN", pool.lb_algorithm)
    assert_equal("HTTP", pool.protocol)
    assert_equal("My round robin pool", pool.description)
    assert_equal(true, pool.admin_state_up)
    assert_equal(Time.parse("2017-04-13T18:14:44"), pool.created)
    assert_equal("ACTIVE", pool.provisioning_status)
    assert_equal(Time.parse("2017-04-13T23:08:12"), pool.updated)
    assert_equal({
        "cookie_name" => nil,
        "type" => "SOURCE_IP"
    }, pool.session_persistence)
    assert_equal("ONLINE", pool.operating_status)
    assert_equal("round_robin_pool", pool.name)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
yao-0.15.0 test/yao/resources/test_loadbalancer_pool.rb
yao-0.14.0 test/yao/resources/test_loadbalancer_pool.rb
yao-0.13.4 test/yao/resources/test_loadbalancer_pool.rb
yao-0.13.3 test/yao/resources/test_loadbalancer_pool.rb
yao-0.13.2 test/yao/resources/test_loadbalancer_pool.rb
yao-0.13.1 test/yao/resources/test_loadbalancer_pool.rb
yao-0.13.0 test/yao/resources/test_loadbalancer_pool.rb
yao-0.12.0 test/yao/resources/test_loadbalancer_pool.rb
yao-0.11.3 test/yao/resources/test_loadbalancer_pool.rb
yao-0.11.2 test/yao/resources/test_loadbalancer_pool.rb
yao-0.11.1 test/yao/resources/test_loadbalancer_pool.rb
yao-0.11.0 test/yao/resources/test_loadbalancer_pool.rb
yao-0.10.1 test/yao/resources/test_loadbalancer_pool.rb
yao-0.10.0 test/yao/resources/test_loadbalancer_pool.rb
yao-0.9.1 test/yao/resources/test_loadbalancer_pool.rb
yao-0.9.0 test/yao/resources/test_loadbalancer_pool.rb