Browse Source

[3556] Reenabled one disabled test (and fixed MySQL to actually pass it)

Tomek Mrugalski 10 years ago
parent
commit
1ea3e6c973

+ 4 - 0
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();
 

+ 1 - 2
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();
 }