]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2723] Fixed lease4NullClientId test.
authorTomek Mrugalski <tomasz@isc.org>
Thu, 21 Feb 2013 16:15:54 +0000 (17:15 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Thu, 21 Feb 2013 16:15:54 +0000 (17:15 +0100)
  - hwaddr was mistaken as client-id again

src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc

index 75131ed7297ae8dbe91bbb3b458b26e83d970dda..1fc4f0b5dddbcd58237925974615833d9ad97edd 100644 (file)
@@ -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);