From: Tomek Mrugalski Date: Thu, 6 Nov 2014 18:40:25 +0000 (+0100) Subject: [3556] Reenabled one disabled test (and fixed MySQL to actually pass it) X-Git-Tag: kea-eng-20141219~7^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1ea3e6c973ae6694deb2282ef00cbed817c101e3;p=thirdparty%2Fkea.git [3556] Reenabled one disabled test (and fixed MySQL to actually pass it) --- diff --git a/src/lib/dhcpsrv/mysql_lease_mgr.cc b/src/lib/dhcpsrv/mysql_lease_mgr.cc index 60c5bcf419..00777f6c7e 100644 --- a/src/lib/dhcpsrv/mysql_lease_mgr.cc +++ b/src/lib/dhcpsrv/mysql_lease_mgr.cc @@ -735,6 +735,10 @@ public: // reasons, see memset() above // duid: varchar(128) + if (!lease_->duid_) { + isc_throw(DbOperationError, "lease6 for address " << addr6_ + << " is missing mandatory client-id."); + } duid_ = lease_->duid_->getDuid(); duid_length_ = duid_.size(); diff --git a/src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc b/src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc index cb164a4937..0e1cf7282e 100644 --- a/src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc +++ b/src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc @@ -518,8 +518,7 @@ TEST_F(MySqlLeaseMgrTest, testRecreateLease6) { } /// @brief Checks that null DUID is not allowed. -/// Test is disabled as MySqlLeaseMgr does not currently defend against a null DUID. -TEST_F(MySqlLeaseMgrTest, DISABLED_nullDuid) { +TEST_F(MySqlLeaseMgrTest, nullDuid) { testNullDuid(); }