]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2995] Dhcpv4Srv tests are now passing again.
authorTomek Mrugalski <tomasz@isc.org>
Thu, 27 Jun 2013 12:15:37 +0000 (14:15 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Thu, 27 Jun 2013 12:15:37 +0000 (14:15 +0200)
src/bin/dhcp4/tests/dhcp4_srv_unittest.cc
src/bin/dhcp6/tests/dhcp6_srv_unittest.cc

index c39c56a69cb84fa581f9f0f0f92530a797b19d0b..0785757a605fbbaaeb9f13e6c1346c2718cc29c8 100644 (file)
@@ -26,6 +26,7 @@
 #include <dhcp/pkt_filter_inet.h>
 #include <dhcp4/dhcp4_srv.h>
 #include <dhcp4/dhcp4_log.h>
+#include <hooks/server_hooks.h>
 #include <dhcpsrv/cfgmgr.h>
 #include <dhcpsrv/lease_mgr.h>
 #include <dhcpsrv/lease_mgr_factory.h>
@@ -155,6 +156,14 @@ public:
         unlink(SRVID_FILE);
     }
 
+    virtual ~Dhcpv4SrvTest() {
+
+        // Remove all registered hook points (it must be done even for tests that
+        // do not use hooks as the base class - Dhcpv4Srv calls allocation engine
+        // that registers hooks)
+        isc::hooks::ServerHooks::getServerHooks().reset();
+    }
+
     /// @brief Add 'Parameter Request List' option to the packet.
     ///
     /// This function PRL option comprising the following option codes:
index 277b7497f5a1dd3b261d2f7cec42f6f2dd43fd2e..b40122d17612a691c7d057b041badd7c722fc2a1 100644 (file)
@@ -111,7 +111,7 @@ public:
 
     virtual ~NakedDhcpv6Srv() {
         // Remove all registered hook points (it must be done even for tests that
-        // do not use hooks as the base class - Dhcpv6Srv registers hooks
+        // do not use hooks as the base class - Dhcpv6Srv registers hooks)
         ServerHooks::getServerHooks().reset();
 
         // Close the lease database