]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[295-min-max-lease-time-configuration-options] Fixed rebase errors
authorFrancis Dupont <fdupont@isc.org>
Wed, 19 Jun 2019 10:47:48 +0000 (12:47 +0200)
committerFrancis Dupont <fdupont@isc.org>
Sat, 22 Jun 2019 14:05:24 +0000 (10:05 -0400)
src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
src/lib/dhcpsrv/tests/alloc_engine6_unittest.cc

index 699b1a86f7133e5210aab91355185dc5ca2e15ad..50d87eb78c7e5258784aabf820fb8dcaba0159c5 100644 (file)
@@ -1522,9 +1522,7 @@ TEST_F(Dhcpv4SrvTest, RenewDefaultLifetime) {
     l = checkLease(ack, clientid, req->getHWAddr(), addr);
     ASSERT_TRUE(l);
 
-    // Check that T1, T2, preferred, valid and cltt were really updated
-    EXPECT_EQ(l->t1_, subnet_->getT1());
-    EXPECT_EQ(l->t2_, subnet_->getT2());
+    // Check that valid and cltt were really updated
     EXPECT_EQ(l->valid_lft_, subnet_->getValid());
 
     // Checking for CLTT is a bit tricky if we want to avoid off by 1 errors
@@ -1616,9 +1614,7 @@ TEST_F(Dhcpv4SrvTest, RenewHintLifetime) {
     l = checkLease(ack, clientid, req->getHWAddr(), addr);
     ASSERT_TRUE(l);
 
-    // Check that T1, T2, preferred, valid and cltt were really updated
-    EXPECT_EQ(l->t1_, subnet_->getT1());
-    EXPECT_EQ(l->t2_, subnet_->getT2());
+    // Check that valid and cltt were really updated
     EXPECT_EQ(l->valid_lft_, hint);
 
     // Checking for CLTT is a bit tricky if we want to avoid off by 1 errors
@@ -1710,9 +1706,7 @@ TEST_F(Dhcpv4SrvTest, RenewMinLifetime) {
     l = checkLease(ack, clientid, req->getHWAddr(), addr);
     ASSERT_TRUE(l);
 
-    // Check that T1, T2, preferred, valid and cltt were really updated
-    EXPECT_EQ(l->t1_, subnet_->getT1());
-    EXPECT_EQ(l->t2_, subnet_->getT2());
+    // Check that valid and cltt were really updated
     EXPECT_EQ(l->valid_lft_, subnet_->getValid().getMin());
 
     // Checking for CLTT is a bit tricky if we want to avoid off by 1 errors
@@ -1803,9 +1797,7 @@ TEST_F(Dhcpv4SrvTest, RenewMaxLifetime) {
     l = checkLease(ack, clientid, req->getHWAddr(), addr);
     ASSERT_TRUE(l);
 
-    // Check that T1, T2, preferred, valid and cltt were really updated
-    EXPECT_EQ(l->t1_, subnet_->getT1());
-    EXPECT_EQ(l->t2_, subnet_->getT2());
+    // Check that valid and cltt were really updated
     EXPECT_EQ(l->valid_lft_, subnet_->getValid().getMax());
 
     // Checking for CLTT is a bit tricky if we want to avoid off by 1 errors
index 1e1e348de868f4caeef63bff68e89fb8a27c9b77..a988482cccb714464c673522f6b33c850d60538b 100644 (file)
@@ -933,7 +933,7 @@ TEST_F(AllocEngine6Test, defaultReuseExpiredLease6) {
     DuidPtr other_duid = DuidPtr(new DUID(vector<uint8_t>(12, 0xff)));
     const uint32_t other_iaid = 3568;
     Lease6Ptr lease(new Lease6(Lease::TYPE_NA, addr, other_duid, other_iaid,
-                               501, 502, 503, 504, subnet_->getID(),
+                               501, 502, subnet_->getID(),
                                HWAddrPtr(), 0));
     lease->cltt_ = time(NULL) - 500; // Allocated 500 seconds ago
     lease->valid_lft_ = 495; // Lease was valid for 495 seconds
@@ -979,7 +979,7 @@ TEST_F(AllocEngine6Test, hintReuseExpiredLease6) {
     DuidPtr other_duid = DuidPtr(new DUID(vector<uint8_t>(12, 0xff)));
     const uint32_t other_iaid = 3568;
     Lease6Ptr lease(new Lease6(Lease::TYPE_NA, addr, other_duid, other_iaid,
-                               501, 502, 503, 504, subnet_->getID(),
+                               501, 502, subnet_->getID(),
                                HWAddrPtr(), 0));
     lease->cltt_ = time(NULL) - 500; // Allocated 500 seconds ago
     lease->valid_lft_ = 495; // Lease was valid for 495 seconds
@@ -1025,7 +1025,7 @@ TEST_F(AllocEngine6Test, minReuseExpiredLease6) {
     DuidPtr other_duid = DuidPtr(new DUID(vector<uint8_t>(12, 0xff)));
     const uint32_t other_iaid = 3568;
     Lease6Ptr lease(new Lease6(Lease::TYPE_NA, addr, other_duid, other_iaid,
-                               501, 502, 503, 504, subnet_->getID(),
+                               501, 502, subnet_->getID(),
                                HWAddrPtr(), 0));
     lease->cltt_ = time(NULL) - 500; // Allocated 500 seconds ago
     lease->valid_lft_ = 495; // Lease was valid for 495 seconds
@@ -1071,7 +1071,7 @@ TEST_F(AllocEngine6Test, maxReuseExpiredLease6) {
     DuidPtr other_duid = DuidPtr(new DUID(vector<uint8_t>(12, 0xff)));
     const uint32_t other_iaid = 3568;
     Lease6Ptr lease(new Lease6(Lease::TYPE_NA, addr, other_duid, other_iaid,
-                               501, 502, 503, 504, subnet_->getID(),
+                               501, 502, subnet_->getID(),
                                HWAddrPtr(), 0));
     lease->cltt_ = time(NULL) - 500; // Allocated 500 seconds ago
     lease->valid_lft_ = 495; // Lease was valid for 495 seconds
@@ -1254,7 +1254,7 @@ TEST_F(AllocEngine6Test, renewExtendLeaseLifetime) {
 TEST_F(AllocEngine6Test, defaultRenewLeaseLifetime) {
     // Create a lease for the client.
     Lease6Ptr lease(new Lease6(Lease::TYPE_NA, IOAddress("2001:db8:1::15"),
-                               duid_, iaid_, 300, 400, 100, 200,
+                               duid_, iaid_, 300, 400,
                                subnet_->getID(), HWAddrPtr(), 128));
 
     // Allocated 200 seconds ago - half of the lifetime.
@@ -1289,7 +1289,7 @@ TEST_F(AllocEngine6Test, defaultRenewLeaseLifetime) {
 TEST_F(AllocEngine6Test, hintRenewLeaseLifetime) {
     // Create a lease for the client.
     Lease6Ptr lease(new Lease6(Lease::TYPE_NA, IOAddress("2001:db8:1::15"),
-                               duid_, iaid_, 300, 400, 100, 200,
+                               duid_, iaid_, 300, 400,
                                subnet_->getID(), HWAddrPtr(), 128));
 
     // Allocated 200 seconds ago - half of the lifetime.
@@ -1324,7 +1324,7 @@ TEST_F(AllocEngine6Test, hintRenewLeaseLifetime) {
 TEST_F(AllocEngine6Test, minRenewLeaseLifetime) {
     // Create a lease for the client.
     Lease6Ptr lease(new Lease6(Lease::TYPE_NA, IOAddress("2001:db8:1::15"),
-                               duid_, iaid_, 300, 400, 100, 200,
+                               duid_, iaid_, 300, 400,
                                subnet_->getID(), HWAddrPtr(), 128));
 
     // Allocated 200 seconds ago - half of the lifetime.
@@ -1359,7 +1359,7 @@ TEST_F(AllocEngine6Test, minRenewLeaseLifetime) {
 TEST_F(AllocEngine6Test, maxRenewLeaseLifetime) {
     // Create a lease for the client.
     Lease6Ptr lease(new Lease6(Lease::TYPE_NA, IOAddress("2001:db8:1::15"),
-                               duid_, iaid_, 300, 400, 100, 200,
+                               duid_, iaid_, 300, 400,
                                subnet_->getID(), HWAddrPtr(), 128));
 
     // Allocated 200 seconds ago - half of the lifetime.