]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2101] check default hooks path in config report
authorRazvan Becheriu <razvan@isc.org>
Fri, 20 Dec 2024 19:18:08 +0000 (21:18 +0200)
committerFrancis Dupont <fdupont@isc.org>
Tue, 24 Dec 2024 13:03:04 +0000 (13:03 +0000)
src/lib/process/cfgrpt/tests/Makefile.am
src/lib/process/cfgrpt/tests/config_report_unittests.cc

index 90fd8412d5ea1a4433a12cb6476405f90799353a..39129fc8877faa8400d2a073ba0c46a2a0cfb597 100644 (file)
@@ -21,6 +21,7 @@ run_unittests_SOURCES = config_report_unittests.cc run_unittests.cc
 run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
 run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
 run_unittests_LDADD  = $(top_builddir)/src/lib/process/cfgrpt/libcfgrpt.la
+run_unittests_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
 run_unittests_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
 run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
 run_unittests_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
index db6de414ccf2e1df7e222996494af77e4a71d81a..a783f3d196f23c7c6f7a89c6d9880c255db3dcd6 100644 (file)
@@ -6,11 +6,13 @@
 
 #include <config.h>
 #include <kea_version.h>
+#include <hooks/hooks_parser.h>
 #include <process/cfgrpt/config_report.h>
 
 #include <gtest/gtest.h>
 
 using namespace isc;
+using namespace isc::hooks;
 using namespace std;
 
 // This test verifies that the getConfigReport() function
@@ -25,4 +27,5 @@ TEST(ConfigReportTest, getConfigReport) {
     ASSERT_FALSE(cfgReport.empty());
     EXPECT_NE(std::string::npos, cfgReport.find(VERSION));
     EXPECT_NE(std::string::npos, cfgReport.find(EXTENDED_VERSION));
+    EXPECT_NE(std::string::npos, cfgReport.find(HooksLibrariesParser::default_hooks_path_));
 }