Sha256: 449a667f876d7ef993d00d292792f6ea29e190ff756111a759ddc306d2d61b44

Contents?: true

Size: 1.19 KB

Versions: 1

Compression:

Stored size: 1.19 KB

Contents

require "time"

class TestLoadBalancerPool < Test::Unit::TestCase
  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(pool.lb_algorithm, "ROUND_ROBIN")
    assert_equal(pool.protocol, "HTTP")
    assert_equal(pool.description, "My round robin pool")
    assert_equal(pool.admin_state_up, true)
    assert_equal(pool.created, Time.parse("2017-04-13T18:14:44"))
    assert_equal(pool.provisioning_status, "ACTIVE")
    assert_equal(pool.updated, Time.parse("2017-04-13T23:08:12"))
    assert_equal(pool.session_persistence, {
        "cookie_name" => nil,
        "type" => "SOURCE_IP"
    })
    assert_equal(pool.operating_status, "ONLINE")
    assert_equal(pool.name, "round_robin_pool")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yao-0.7.0 test/yao/resources/test_loadbalancer_pool.rb