From: Tomek Mrugalski Date: Thu, 21 Feb 2013 16:15:54 +0000 (+0100) Subject: [2723] Fixed lease4NullClientId test. X-Git-Tag: bind10-1.1.0beta1-release~19^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28e4d9aaa305d597c533f43c8eaaae37567d6896;p=thirdparty%2Fkea.git [2723] Fixed lease4NullClientId test. - hwaddr was mistaken as client-id again --- diff --git a/src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc b/src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc index 75131ed729..1fc4f0b5dd 100644 --- a/src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc +++ b/src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc @@ -751,14 +751,13 @@ TEST_F(MySqlLeaseMgrTest, lease4NullClientId) { // Check that we can't add a second lease with the same address EXPECT_FALSE(lmptr_->addLease(leases[1])); - // Check that we can get the lease by HWAddr - Lease4Collection returned = lmptr_->getLease4(leases[2]->hwaddr_); - + HWAddr tmp(leases[2]->hwaddr_, HTYPE_ETHER); + Lease4Collection returned = lmptr_->getLease4(tmp); ASSERT_EQ(1, returned.size()); detailCompareLease(leases[2], *returned.begin()); - l_returned = lmptr_->getLease4(leases[2]->hwaddr_, leases[2]->subnet_id_); + l_returned = lmptr_->getLease4(tmp, leases[2]->subnet_id_); ASSERT_TRUE(l_returned); detailCompareLease(leases[2], l_returned);