]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[492-cb-subnet-merge-vs-duplicate-subnet-prefixes] Added test
authorFrancis Dupont <fdupont@isc.org>
Sat, 2 Mar 2019 00:04:14 +0000 (01:04 +0100)
committerMarcin Siodelski <marcin@isc.org>
Fri, 24 May 2019 16:30:00 +0000 (12:30 -0400)
src/lib/dhcpsrv/tests/cfg_subnets4_unittest.cc

index 9a1fef2f31417c629205ad34220b7ab17e0e076d..a491036facff22910300f35467cf5ccb13246fb1 100644 (file)
@@ -269,8 +269,8 @@ TEST(CfgSubnets4Test, mergeSubnets) {
                                               SubnetID(4), 100, shared_network2));
 
     // Fill cfg_from configuration with subnets.
-    // subnet 1b updates subnet 1 but leaves it in network 1
-    Subnet4Ptr subnet1b(new Subnet4(IOAddress("192.0.1.0"),
+    // subnet 1b updates subnet 1 but leaves it in network 1 with the same ID.
+    Subnet4Ptr subnet1b(new Subnet4(IOAddress("192.0.10.0"),
                                    26, 2, 3, 400, SubnetID(1)));
     subnet1b->setSharedNetworkName("shared-network1");
 
@@ -280,9 +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 and removes it from network 2
     Subnet4Ptr subnet3b(new Subnet4(IOAddress("192.0.3.0"),
-                                   26, 3, 4, 500, SubnetID(3)));
+                                   26, 3, 4, 500, SubnetID(30)));
 
     // Now Add generic option 1 to subnet 3b.
     value = "Team!";