diff options
author | Razvan Becheriu <razvan@isc.org> | 2020-05-13 10:05:01 +0200 |
---|---|---|
committer | Razvan Becheriu <razvan@isc.org> | 2020-05-15 20:21:41 +0200 |
commit | 7dcb9b8215ea913efebc05b8c342364f6535fc40 (patch) | |
tree | 59dcb92b7989cb9d76bfea1cb9263b781b4f89b6 /src/bin/dhcp4/tests | |
parent | [#1229] hammer: added support for building kea on alpine 3.11 (diff) | |
download | kea-7dcb9b8215ea913efebc05b8c342364f6535fc40.tar.xz kea-7dcb9b8215ea913efebc05b8c342364f6535fc40.zip |
[#1127] never update lm_collection_ outside init functions
Diffstat (limited to 'src/bin/dhcp4/tests')
-rw-r--r-- | src/bin/dhcp4/tests/hooks_unittest.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/bin/dhcp4/tests/hooks_unittest.cc b/src/bin/dhcp4/tests/hooks_unittest.cc index 4e3d0ae858..9c4203e331 100644 --- a/src/bin/dhcp4/tests/hooks_unittest.cc +++ b/src/bin/dhcp4/tests/hooks_unittest.cc @@ -129,7 +129,7 @@ public: HooksManager::preCalloutsLibraryHandle().deregisterAllCallouts("lease4_decline"); HooksManager::preCalloutsLibraryHandle().deregisterAllCallouts("host4_identifier"); - HooksManager::getSharedCalloutManager().reset(); + HooksManager::getHooksManager().setSharedCalloutManager(); delete srv_; } @@ -2378,7 +2378,8 @@ TEST_F(HooksDhcpv4SrvTest, HooksDecline) { IfaceMgr::instance().openSockets4(); // Libraries will be reloaded later - HooksManager::getSharedCalloutManager().reset(new CalloutManager(0)); + HooksManager::getHooksManager().setSharedCalloutManager( + boost::shared_ptr<CalloutManager>(new CalloutManager(0))); // Install a callout EXPECT_NO_THROW(HooksManager::preCalloutsLibraryHandle().registerCallout( @@ -2430,7 +2431,8 @@ TEST_F(HooksDhcpv4SrvTest, HooksDeclineSkip) { IfaceMgr::instance().openSockets4(); // Libraries will be reloaded later - HooksManager::getSharedCalloutManager().reset(new CalloutManager(0)); + HooksManager::getHooksManager().setSharedCalloutManager( + boost::shared_ptr<CalloutManager>(new CalloutManager(0))); // Install a callout EXPECT_NO_THROW(HooksManager::preCalloutsLibraryHandle().registerCallout( @@ -2481,7 +2483,8 @@ TEST_F(HooksDhcpv4SrvTest, HooksDeclineDrop) { IfaceMgr::instance().openSockets4(); // Libraries will be reloaded later - HooksManager::getSharedCalloutManager().reset(new CalloutManager(0)); + HooksManager::getHooksManager().setSharedCalloutManager( + boost::shared_ptr<CalloutManager>(new CalloutManager(0))); // Install a callout EXPECT_NO_THROW(HooksManager::preCalloutsLibraryHandle().registerCallout( |