]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3752] Fixed flush and .spec stuff
authorFrancis Dupont <fdupont@isc.org>
Fri, 3 Jul 2015 16:40:08 +0000 (18:40 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 3 Jul 2015 16:40:08 +0000 (18:40 +0200)
src/lib/dhcpsrv/logging_info.cc
src/lib/dhcpsrv/tests/logging_unittest.cc

index 5cededf8d2c3a9d1dbb0cef2e281bf6eba42da93..f7638b3436c6f16d24c331795ce9753e8a6d5fbc 100644 (file)
@@ -136,7 +136,7 @@ LoggingInfo::toSpec() const {
         }
 
         // Copy the immediate flush flag
-        option.flush = flush_;
+        option.flush = dest->flush_;
 
         // ... and set the destination
         spec.addOutputOption(option);
index 0d476cc15b65d23e5b1ad682ea3207eefafde698..de321692074075849ddc49adaa52daa5bd47fe26 100644 (file)
@@ -15,6 +15,7 @@
 #include <config.h>
 #include <exceptions/exceptions.h>
 #include <cc/data.h>
+#include <config/module_spec.h>
 #include <dhcpsrv/logging.h>
 #include <gtest/gtest.h>
 #include <log/logger_support.h>
@@ -25,17 +26,6 @@ using namespace isc::data;
 
 namespace {
 
-// Helper to get the spec file
-std::string specfile(const std::string& name) {
-    return (std::string(TEST_DATA_BUILDDIR) + "/../" + name);
-}
-
-// Tests that the spec file is valid.
-TEST(LoggingTest, basicSpec) {
-    using namespace isc::config;
-    ASSERT_NO_THROW(moduleSpecFromFile(specfile("logging.spec")));
-}
-
 /// @brief Logging Test Fixture Class
 ///
 /// Trivial class that ensures that the logging is reset to its defaults after
@@ -56,6 +46,15 @@ class LoggingTest : public ::testing::Test {
         }
 };
 
+// Helper to get the spec file
+std::string specfile(const std::string& name) {
+    return (std::string(TEST_DATA_BUILDDIR) + "/../" + name);
+}
+
+// Tests that the spec file is valid.
+TEST_F(LoggingTest, basicSpec) {
+    ASSERT_NO_THROW(isc::config::moduleSpecFromFile(specfile("logging.spec")));
+}
 
 // Checks that contructor is able to process specified storage properly
 TEST_F(LoggingTest, constructor) {