7 #ifndef ISC_TESTUTILS_LIB_LOAD_TEST_FIXTURE_H
8 #define ISC_TESTUTILS_LIB_LOAD_TEST_FIXTURE_H
24 LibLoadTest(
const std::string lib_so_name =
"no-lib-specified")
83 uint16_t family = AF_INET,
114 uint16_t family = AF_INET,
127 <<
", should not have loaded for: " << daemon_name;
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
void setFamily(uint16_t family)
Sets address family (AF_INET or AF_INET6)
static CfgMgr & instance()
returns a single instance of Configuration Manager
static bool unloadLibraries()
Unload libraries.
static bool loadLibraries(const HookLibsCollection &libraries, bool multi_threading_enabled=false)
Load and reload libraries.
static void setProcName(const std::string &proc_name)
Sets the process name.
Test fixture for testing loading and unloading of hook libraries.
bool unloadLibraries()
Unloads all libraries.
LibLoadTest(const std::string lib_so_name="no-lib-specified")
Constructor.
isc::data::ElementPtr valid_params_
Contains a set configuration parameters valid for the library.
std::string lib_so_name_
full pathname to the library so file under test;
void addLibrary(const std::string &library, isc::data::ConstElementPtr parameters)
Adds a library along with its parameters to the list of libraries to be loaded.
bool loadLibraries()
Load all libraries.
virtual isc::data::ElementPtr validConfigParams()
Creates a set configuration parameters valid for the library.
void invalidDaemonTest(const std::string &daemon_name, uint16_t family=AF_INET, const isc::data::ElementPtr ¶ms=isc::data::ElementPtr())
Verifies that an invalid daemon cannot load the library.
~LibLoadTest()
Destructor. Unloads any previously loaded libraries.
isc::hooks::HookLibsCollection libraries_
Libraries.
void validDaemonTest(const std::string &daemon_name, uint16_t family=AF_INET, const isc::data::ElementPtr ¶ms=isc::data::ElementPtr())
Verifies that a valid daemon can load and unload a library multiple times.
#define ASSERT_NO_THROW_LOG(statement)
Generates a fatal failure with exception info, if the given expression throws.
boost::shared_ptr< const Element > ConstElementPtr
boost::shared_ptr< Element > ElementPtr
std::vector< HookLibInfo > HookLibsCollection
A storage for information about hook libraries.
Defines the logger used by the top-level component of kea-lfc.