2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[#1282] Final cleanups

This commit is contained in:
Francis Dupont
2020-06-26 16:14:31 +02:00
parent 9ea6feb15c
commit 4e36974fc9
5 changed files with 16 additions and 5 deletions

View File

@@ -203,7 +203,7 @@ public:
/// that no libraries are loaded and that any marker files are deleted.
void reset() {
// Unload any previously-loaded libraries.
HooksManager::unloadLibraries();
EXPECT_TRUE(HooksManager::unloadLibraries());
// Get rid of any marker files.
static_cast<void>(remove(LOAD_MARKER_FILE));

View File

@@ -118,7 +118,7 @@ public:
/// that no libraries are loaded and that any marker files are deleted.
virtual void reset() {
// Unload any previously-loaded libraries.
HooksManager::unloadLibraries();
EXPECT_TRUE(HooksManager::unloadLibraries());
// Get rid of any marker files.
static_cast<void>(remove(LOAD_MARKER_FILE));

View 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
// License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -217,6 +217,12 @@ public:
// Remove callouts executed.
callouts_.clear();
// Unload libraries.
bool status = HooksManager::unloadLibraries();
if (!status) {
cerr << "(fixture dtor) unloadLibraries failed" << endl;
}
}
/// @brief Starts D2 client.

View File

@@ -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
// 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 <boost/date_time/posix_time/posix_time.hpp>
#include <gtest/gtest.h>
#include <iostream>
#include <map>
#include <string>
@@ -54,6 +55,10 @@ public:
// Unregister hooks.
HooksManager::preCalloutsLibraryHandle().deregisterAllCallouts("cb4_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.

View File

@@ -468,7 +468,7 @@ public:
family_ = family;
// Ensure no hooks libraries are loaded.
HooksManager::unloadLibraries();
EXPECT_TRUE(HooksManager::unloadLibraries());
// Set it to minimal, disabled config
D2ClientConfigPtr tmp(new D2ClientConfig());