From: Marcin Siodelski Date: Mon, 27 Jan 2014 16:26:34 +0000 (+0100) Subject: [3295] Fixed an Allocation Engine test to check that old lease is NULL. X-Git-Tag: bind10-1.2.0beta1-release~83^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=43eabfa8ba1ebfcfdf2ad22e5425e03c9782c86f;p=thirdparty%2Fkea.git [3295] Fixed an Allocation Engine test to check that old lease is NULL. --- diff --git a/src/lib/dhcpsrv/tests/alloc_engine_unittest.cc b/src/lib/dhcpsrv/tests/alloc_engine_unittest.cc index 97fb86de07..4330efd423 100644 --- a/src/lib/dhcpsrv/tests/alloc_engine_unittest.cc +++ b/src/lib/dhcpsrv/tests/alloc_engine_unittest.cc @@ -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