]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1950] Reverted last test changes
authorFrancis Dupont <fdupont@isc.org>
Thu, 15 Jul 2021 12:01:24 +0000 (14:01 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 15 Jul 2021 12:01:24 +0000 (14:01 +0200)
src/bin/d2/tests/Makefile.am
src/bin/d2/tests/configured_library.cc

index 334f4df7450cd6512c5360a55cfb33ca53efa152..2d0013561c070b95f5c5345ea8fcffe7fd830241 100644 (file)
@@ -111,14 +111,14 @@ libcallout_la_LDFLAGS  = -avoid-version -export-dynamic -module -rpath /nowhere
 # The d2_srv_configured callout library
 libconfigured_la_SOURCES  = configured_library.cc
 libconfigured_la_CXXFLAGS = $(AM_CXXFLAGS)
-libconfigured_la_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
+libconfigured_la_CPPFLAGS = $(AM_CPPFLAGS)
 libconfigured_la_LIBADD   = $(top_builddir)/src/lib/hooks/libkea-hooks.la
 libconfigured_la_LIBADD  += $(top_builddir)/src/lib/cc/libkea-cc.la
 libconfigured_la_LIBADD  += $(top_builddir)/src/lib/asiolink/libkea-asiolink.la
 libconfigured_la_LIBADD  += $(top_builddir)/src/lib/log/libkea-log.la
 libconfigured_la_LIBADD  += $(top_builddir)/src/lib/util/libkea-util.la
 libconfigured_la_LIBADD  += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
-libconfigured_la_LIBADD  += $(LOG4CPLUS_LIBS) $(BOOST_LIBS) $(GTEST_LDADD)
+libconfigured_la_LIBADD  += $(LOG4CPLUS_LIBS) $(BOOST_LIBS)
 libconfigured_la_LDFLAGS  = -avoid-version -export-dynamic -module -rpath /nowhere
 
 noinst_LTLIBRARIES = libcallout.la libconfigured.la
index a6353cfd63b1c40c694af1020b88f2e06b7351af..6bf872f636db3c076ec1d205e858df5f2fe125a6 100644 (file)
@@ -9,7 +9,6 @@
 #include <config.h>
 #include <cc/data.h>
 #include <hooks/hooks.h>
-#include <gtest/gtest.h>
 
 using namespace isc::data;
 using namespace isc::hooks;
@@ -23,22 +22,18 @@ extern "C" {
 int
 d2_srv_configured(CalloutHandle& handle) {
     // Get the parameters.
-    EXPECT_EQ(CalloutHandle::NEXT_STEP_CONTINUE, handle.getStatus());
     ConstElementPtr cfg;
-    handle.getArgument("json_config", cfg);
-    EXPECT_TRUE(cfg);
-    if (!cfg) {
-        return (1);
-    }
     string error;
+    handle.getArgument("json_config", cfg);
     handle.getArgument("error", error);
-    EXPECT_TRUE(error.empty());
 
-    ConstElementPtr uc = cfg->get("user-context");
-    if (uc) {
-        ConstElementPtr msg = uc->get("error");
-        if (msg && (msg->getType() == Element::string)) {
-            error = msg->stringValue();
+    if (cfg) {
+        ConstElementPtr uc = cfg->get("user-context");
+        if (uc) {
+            ConstElementPtr msg = uc->get("error");
+            if (msg && (msg->getType() == Element::string)) {
+                error = msg->stringValue();
+            }
         }
     }