From: Marcin Siodelski Date: Fri, 24 May 2019 12:37:15 +0000 (+0200) Subject: [#492,!252] Adjusted CfgSubnets4 unit tests after rebase with conflicts. X-Git-Tag: Kea-1.6.0-beta~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f4b53fb5bbbb719aa8e2d4dc134a645264bde38;p=thirdparty%2Fkea.git [#492,!252] Adjusted CfgSubnets4 unit tests after rebase with conflicts. --- diff --git a/src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc b/src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc index a491036fac..85ec286e6f 100644 --- a/src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc @@ -280,6 +280,8 @@ TEST(CfgSubnets4Test, mergeSubnets) { option->setData(value.begin(), value.end()); ASSERT_NO_THROW(subnet1b->getCfgOption()->add(option, false, "isc")); + // subnet 3b updates subnet 3 with different ID and removes it + // from network 2 Subnet4Ptr subnet3b(new Subnet4(IOAddress("192.0.3.0"), 26, 3, 4, 500, SubnetID(30))); @@ -327,11 +329,11 @@ TEST(CfgSubnets4Test, mergeSubnets) { ASSERT_EQ(5, cfg_to.getAll()->size()); // The subnet1 should be replaced by subnet1b. - ASSERT_NO_FATAL_FAILURE(checkMergedSubnet(cfg_to, "192.0.1.0/26", + ASSERT_NO_FATAL_FAILURE(checkMergedSubnet(cfg_to, "192.0.10.0/26", SubnetID(1), 400, shared_network1)); // Let's verify that our option is there and populated correctly. - auto subnet = cfg_to.getByPrefix("192.0.1.0/26"); + auto subnet = cfg_to.getByPrefix("192.0.10.0/26"); auto desc = subnet->getCfgOption()->get("isc", 1); ASSERT_TRUE(desc.option_); OptionStringPtr opstr = boost::dynamic_pointer_cast(desc.option_); @@ -344,7 +346,7 @@ TEST(CfgSubnets4Test, mergeSubnets) { // subnet3 should be replaced by subnet3b and no longer assigned to a network. ASSERT_NO_FATAL_FAILURE(checkMergedSubnet(cfg_to, "192.0.3.0/26", - SubnetID(3), 500, no_network)); + SubnetID(30), 500, no_network)); // Let's verify that our option is there and populated correctly. subnet = cfg_to.getByPrefix("192.0.3.0/26"); desc = subnet->getCfgOption()->get("isc", 1);