mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-03 07:25:18 +00:00
[#1282] Final cleanups
This commit is contained in:
@@ -203,7 +203,7 @@ public:
|
|||||||
/// that no libraries are loaded and that any marker files are deleted.
|
/// that no libraries are loaded and that any marker files are deleted.
|
||||||
void reset() {
|
void reset() {
|
||||||
// Unload any previously-loaded libraries.
|
// Unload any previously-loaded libraries.
|
||||||
HooksManager::unloadLibraries();
|
EXPECT_TRUE(HooksManager::unloadLibraries());
|
||||||
|
|
||||||
// Get rid of any marker files.
|
// Get rid of any marker files.
|
||||||
static_cast<void>(remove(LOAD_MARKER_FILE));
|
static_cast<void>(remove(LOAD_MARKER_FILE));
|
||||||
|
@@ -118,7 +118,7 @@ public:
|
|||||||
/// that no libraries are loaded and that any marker files are deleted.
|
/// that no libraries are loaded and that any marker files are deleted.
|
||||||
virtual void reset() {
|
virtual void reset() {
|
||||||
// Unload any previously-loaded libraries.
|
// Unload any previously-loaded libraries.
|
||||||
HooksManager::unloadLibraries();
|
EXPECT_TRUE(HooksManager::unloadLibraries());
|
||||||
|
|
||||||
// Get rid of any marker files.
|
// Get rid of any marker files.
|
||||||
static_cast<void>(remove(LOAD_MARKER_FILE));
|
static_cast<void>(remove(LOAD_MARKER_FILE));
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2015-2019 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2015-2020 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -217,6 +217,12 @@ public:
|
|||||||
|
|
||||||
// Remove callouts executed.
|
// Remove callouts executed.
|
||||||
callouts_.clear();
|
callouts_.clear();
|
||||||
|
|
||||||
|
// Unload libraries.
|
||||||
|
bool status = HooksManager::unloadLibraries();
|
||||||
|
if (!status) {
|
||||||
|
cerr << "(fixture dtor) unloadLibraries failed" << endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @brief Starts D2 client.
|
/// @brief Starts D2 client.
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2019 Internet Systems Consortium, Inc. ("ISC")
|
// Copyright (C) 2019-2020 Internet Systems Consortium, Inc. ("ISC")
|
||||||
//
|
//
|
||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
#include <hooks/hooks_manager.h>
|
#include <hooks/hooks_manager.h>
|
||||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
#include <iostream>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@@ -54,6 +55,10 @@ public:
|
|||||||
// Unregister hooks.
|
// Unregister hooks.
|
||||||
HooksManager::preCalloutsLibraryHandle().deregisterAllCallouts("cb4_updated");
|
HooksManager::preCalloutsLibraryHandle().deregisterAllCallouts("cb4_updated");
|
||||||
HooksManager::preCalloutsLibraryHandle().deregisterAllCallouts("cb6_updated");
|
HooksManager::preCalloutsLibraryHandle().deregisterAllCallouts("cb6_updated");
|
||||||
|
bool status = HooksManager::unloadLibraries();
|
||||||
|
if (!status) {
|
||||||
|
std::cerr << "(fixture dtor) unloadLibraries failed" << std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @brief Creates new CREATE audit entry.
|
/// @brief Creates new CREATE audit entry.
|
||||||
|
@@ -468,7 +468,7 @@ public:
|
|||||||
family_ = family;
|
family_ = family;
|
||||||
|
|
||||||
// Ensure no hooks libraries are loaded.
|
// Ensure no hooks libraries are loaded.
|
||||||
HooksManager::unloadLibraries();
|
EXPECT_TRUE(HooksManager::unloadLibraries());
|
||||||
|
|
||||||
// Set it to minimal, disabled config
|
// Set it to minimal, disabled config
|
||||||
D2ClientConfigPtr tmp(new D2ClientConfig());
|
D2ClientConfigPtr tmp(new D2ClientConfig());
|
||||||
|
Reference in New Issue
Block a user