]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3556] Reenabled one disabled test (and fixed MySQL to actually pass it)
authorTomek Mrugalski <tomasz@isc.org>
Thu, 6 Nov 2014 18:40:25 +0000 (19:40 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Thu, 6 Nov 2014 18:40:25 +0000 (19:40 +0100)
src/lib/dhcpsrv/mysql_lease_mgr.cc
src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc

index 60c5bcf4192b78140d02f6052179155b133178c7..00777f6c7efb5decfd5ded8e18752fc4d76f4736 100644 (file)
@@ -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();
 
index cb164a493718a927de883305ae1d3d3595fe7fe1..0e1cf7282e03c5eb90f2461cbb759ed6727afd7e 100644 (file)
@@ -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();
 }