]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3295] Fixed an Allocation Engine test to check that old lease is NULL.
authorMarcin Siodelski <marcin@isc.org>
Mon, 27 Jan 2014 16:26:34 +0000 (17:26 +0100)
committerMarcin Siodelski <marcin@isc.org>
Mon, 27 Jan 2014 16:26:34 +0000 (17:26 +0100)
src/lib/dhcpsrv/tests/alloc_engine_unittest.cc

index 97fb86de077c0dc2bc3f968c5efc5d5ea11411e4..4330efd42390a8cf654c67aa120df56d232111a6 100644 (file)
@@ -836,9 +836,10 @@ TEST_F(AllocEngine6Test, smallPool6) {
     // Now check that the lease in LeaseMgr has the same parameters
     detailCompareLease(lease, from_mgr);
 
-    // This is a new lease allocation. The collection of old leases should be
-    // empty.
-    EXPECT_TRUE(old_leases_.empty());
+    // This is a new lease allocation. The old lease corresponding to a newly
+    // allocated lease should be NULL.
+    ASSERT_EQ(1, old_leases_.size());
+    EXPECT_FALSE(old_leases_[0]);
 }
 
 // This test checks if all addresses in a pool are currently used, the attempt