Commit 4e36974f authored by Francis Dupont's avatar Francis Dupont

[#1282] Final cleanups

parent 9ea6feb1
......@@ -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));
......
......@@ -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));
......
// 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.
......
// 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.
......
......@@ -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());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment