From: Francis Dupont Date: Fri, 3 Jul 2015 16:40:08 +0000 (+0200) Subject: [3752] Fixed flush and .spec stuff X-Git-Tag: trac3911a_base~2^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=50570f6baa914686bf83120da5058b76a3580e5d;p=thirdparty%2Fkea.git [3752] Fixed flush and .spec stuff --- diff --git a/src/lib/dhcpsrv/logging_info.cc b/src/lib/dhcpsrv/logging_info.cc index 5cededf8d2..f7638b3436 100644 --- a/src/lib/dhcpsrv/logging_info.cc +++ b/src/lib/dhcpsrv/logging_info.cc @@ -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); diff --git a/src/lib/dhcpsrv/tests/logging_unittest.cc b/src/lib/dhcpsrv/tests/logging_unittest.cc index 0d476cc15b..de32169207 100644 --- a/src/lib/dhcpsrv/tests/logging_unittest.cc +++ b/src/lib/dhcpsrv/tests/logging_unittest.cc @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -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) {