Sha256: 0536d2d8db4a7f61378fd8d5dd148471746353cc9972c249e6b9d6411d5b821e

Contents?: true

Size: 990 Bytes

Versions: 1

Compression:

Stored size: 990 Bytes

Contents

require "time"

class TestLoadBalancer < Test::Unit::TestCase
  def test_loadbalancer
    params = {
      "provider" => "octavia",
      "description" => "greate loadbalancer",
      "admin_state_up" => true,
      "provisioning_status" => "ACTIVE",
      "vip_address" => "198.51.100.1",
      "operationg_status" => "ONLINE",
      "name" => "greate loadbalancer",
      "created_at" => "2017-02-28T00:41:44",
      "updated_at" => "2017-02-28T00:43:30",
    }

    lb = Yao::Resources::LoadBalancer.new(params)
    assert_equal(lb.provider, "octavia")
    assert_equal(lb.description, "greate loadbalancer")
    assert_equal(lb.admin_state_up, true)
    assert_equal(lb.provisioning_status, "ACTIVE")
    assert_equal(lb.vip_address, "198.51.100.1")
    assert_equal(lb.operationg_status, "ONLINE")
    assert_equal(lb.name, "greate loadbalancer")
    assert_equal(lb.created, Time.parse("2017-02-28T00:41:44"))
    assert_equal(lb.updated, Time.parse("2017-02-28T00:43:30"))
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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