test/yao/resources/test_network.rb in yao-0.19.0 vs test/yao/resources/test_network.rb in yao-0.20.0
- old
+ new
@@ -12,11 +12,11 @@
"provider:physical_network" => "physnet1",
"provider:segmentation_id" => 1000,
"router:external" => false,
"shared" => false,
"status" => "ACTIVE",
- "subnets" => [],
+ "subnets" => ["52822b63-eb89-496d-9509-f91473b9d85d"],
"tenant_id" => "c05140b3dc7c4555afff9fab6b58edc2",
"project_id" => "c05140b3dc7c4555afff9fab6b58edc2",
}
network = Yao::Network.new(params)
@@ -26,16 +26,18 @@
assert_equal("net1", network.name)
assert_equal("ACTIVE", network.status)
assert_equal(false, network.shared)
assert_equal(false, network.shared?)
assert_equal("c05140b3dc7c4555afff9fab6b58edc2", network.tenant_id)
- assert_equal([], network.subnets)
assert_equal(true, network.admin_state_up)
#map_attribute_to_attribute
assert_equal("physnet1", network.physical_network)
assert_equal("vlan", network.type)
assert_equal(1000, network.segmentation_id)
+
+ assert_equal(Yao::Subnet, network.subnets.first.class)
+ assert_equal("52822b63-eb89-496d-9509-f91473b9d85d", network.subnets.first.id)
end
def test_project
stub = stub_request(:get, "https://example.com:12345/projects/0123456789abcdef0123456789abcdef")