Commit 1c29e58e authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[#25,!14] libprocess code now compiles and unit-tests pass

parent 327aa101
...@@ -54,7 +54,7 @@ public: ...@@ -54,7 +54,7 @@ public:
/// @brief Compares two configuration. /// @brief Compares two configuration.
/// ///
/// @param other the other configuration to compare to /// @param other the other configuration to compare to
virtual bool equals(const ConfigBase& other) const; bool equals(const ConfigBase& other) const;
/// @brief Converts to Element representation /// @brief Converts to Element representation
/// ///
...@@ -70,7 +70,7 @@ protected: ...@@ -70,7 +70,7 @@ protected:
/// by descendant classes. /// by descendant classes.
/// ///
/// @param new_config this configuration will be copied to new_config /// @param new_config this configuration will be copied to new_config
virtual void copy(ConfigBase& new_config) const; void copy(ConfigBase& new_config) const;
private: private:
/// @brief Logging specific information. /// @brief Logging specific information.
......
...@@ -60,7 +60,7 @@ typedef boost::shared_ptr<DCfgContextBase> DCfgContextBasePtr; ...@@ -60,7 +60,7 @@ typedef boost::shared_ptr<DCfgContextBase> DCfgContextBasePtr;
/// // Restore from backup /// // Restore from backup
/// context_ = backup_copy; /// context_ = backup_copy;
/// ///
class DCfgContextBase : public isc::dhcp::UserContext, public isc::data::CfgToElement { class DCfgContextBase : public isc::data::UserContext, public isc::data::CfgToElement {
public: public:
/// @brief Indicator that a configuration parameter is optional. /// @brief Indicator that a configuration parameter is optional.
static const bool OPTIONAL = true; static const bool OPTIONAL = true;
......
...@@ -100,7 +100,7 @@ DControllerBase::launch(int argc, char* argv[], const bool test_mode) { ...@@ -100,7 +100,7 @@ DControllerBase::launch(int argc, char* argv[], const bool test_mode) {
try { try {
createPIDFile(); createPIDFile();
} catch (const dhcp::DaemonPIDExists& ex) { } catch (const DaemonPIDExists& ex) {
LOG_FATAL(dctl_logger, DCTL_ALREADY_RUNNING) LOG_FATAL(dctl_logger, DCTL_ALREADY_RUNNING)
.arg(bin_name_).arg(ex.what()); .arg(bin_name_).arg(ex.what());
isc_throw (LaunchError, "Launch Failed: " << ex.what()); isc_throw (LaunchError, "Launch Failed: " << ex.what());
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
#include <asiolink/io_service.h> #include <asiolink/io_service.h>
#include <cc/data.h> #include <cc/data.h>
#include <dhcpsrv/daemon.h>
#include <exceptions/exceptions.h> #include <exceptions/exceptions.h>
#include <log/logger_support.h> #include <log/logger_support.h>
#include <process/daemon.h>
#include <process/d_log.h> #include <process/d_log.h>
#include <process/d_process.h> #include <process/d_process.h>
#include <process/io_service_signal.h> #include <process/io_service_signal.h>
...@@ -101,7 +101,7 @@ typedef boost::shared_ptr<DControllerBase> DControllerBasePtr; ...@@ -101,7 +101,7 @@ typedef boost::shared_ptr<DControllerBase> DControllerBasePtr;
/// NOTE: Derivations must supply their own static singleton instance method(s) /// NOTE: Derivations must supply their own static singleton instance method(s)
/// for creating and fetching the instance. The base class declares the instance /// for creating and fetching the instance. The base class declares the instance
/// member in order for it to be available for static callback functions. /// member in order for it to be available for static callback functions.
class DControllerBase : public dhcp::Daemon { class DControllerBase : public Daemon {
public: public:
/// @brief Constructor /// @brief Constructor
/// ///
......
// Copyright (C) 2014-2015,2017 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
#include <config.h> #include <config.h>
#include <cc/data.h> #include <cc/data.h>
#include <dhcpsrv/cfgmgr.h> #include <process/daemon.h>
#include <dhcpsrv/daemon.h> #include <process/log_parser.h>
#include <exceptions/exceptions.h> #include <exceptions/exceptions.h>
#include <log/logger_name.h> #include <log/logger_name.h>
#include <log/logger_support.h> #include <log/logger_support.h>
#include <logging.h> #include <process/cfg_base.h>
#include <util/filename.h> #include <util/filename.h>
#include <boost/bind.hpp> #include <boost/bind.hpp>
...@@ -25,11 +25,15 @@ ...@@ -25,11 +25,15 @@
/// This file provides stub implementations that are expected to be redefined /// This file provides stub implementations that are expected to be redefined
/// in derived classes (e.g. ControlledDhcpv6Srv) /// in derived classes (e.g. ControlledDhcpv6Srv)
namespace isc { namespace isc {
namespace dhcp { namespace process {
bool Daemon::verbose_ = false;
std::string Daemon::default_logger_name_("kea");
Daemon::Daemon() Daemon::Daemon()
: signal_set_(), signal_handler_(), config_file_(""), proc_name_(""), : signal_set_(), signal_handler_(), config_file_(""), proc_name_(""),
pid_file_dir_(DHCP_DATA_DIR), pid_file_(), am_file_author_(false) { pid_file_dir_(DATA_DIR), pid_file_(), am_file_author_(false) {
// The pid_file_dir can be overridden via environment variable // The pid_file_dir can be overridden via environment variable
// This is primarily intended to simplify testing // This is primarily intended to simplify testing
...@@ -60,25 +64,25 @@ void Daemon::handleSignal() { ...@@ -60,25 +64,25 @@ void Daemon::handleSignal() {
} }
void Daemon::configureLogger(const isc::data::ConstElementPtr& log_config, void Daemon::configureLogger(const isc::data::ConstElementPtr& log_config,
const SrvConfigPtr& storage) { const ConfigPtr& storage) {
if (log_config) { if (log_config) {
isc::data::ConstElementPtr loggers = log_config->get("loggers"); isc::data::ConstElementPtr loggers = log_config->get("loggers");
if (loggers) { if (loggers) {
LogConfigParser parser(storage); LogConfigParser parser(storage);
parser.parseConfiguration(loggers, CfgMgr::instance().isVerbose()); parser.parseConfiguration(loggers, verbose_);
} }
} }
} }
void void
Daemon::setVerbose(bool verbose) { Daemon::setVerbose(bool verbose) {
CfgMgr::instance().setVerbose(verbose); verbose_ = verbose;
} }
bool bool
Daemon::getVerbose() const { Daemon::getVerbose() {
return (CfgMgr::instance().isVerbose()); return (verbose_);
} }
void Daemon::loggerInit(const char* name, bool verbose) { void Daemon::loggerInit(const char* name, bool verbose) {
...@@ -209,10 +213,6 @@ Daemon::createPIDFile(int pid) { ...@@ -209,10 +213,6 @@ Daemon::createPIDFile(int pid) {
size_t size_t
Daemon::writeConfigFile(const std::string& config_file, Daemon::writeConfigFile(const std::string& config_file,
isc::data::ConstElementPtr cfg) const { isc::data::ConstElementPtr cfg) const {
if (!cfg) {
cfg = CfgMgr::instance().getCurrentCfg()->toElement();
}
if (!cfg) { if (!cfg) {
isc_throw(Unexpected, "Can't write configuration: conversion to JSON failed"); isc_throw(Unexpected, "Can't write configuration: conversion to JSON failed");
} }
......
// Copyright (C) 2014-2015,2017 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
#define DAEMON_H #define DAEMON_H
#include <cc/data.h> #include <cc/data.h>
#include <dhcpsrv/srv_config.h> #include <process/config_base.h>
#include <util/pid_file.h> #include <util/pid_file.h>
#include <util/signal_set.h> #include <util/signal_set.h>
#include <boost/noncopyable.hpp> #include <boost/noncopyable.hpp>
#include <string> #include <string>
namespace isc { namespace isc {
namespace dhcp { namespace process {
/// @brief Exception thrown when a the PID file points to a live PID /// @brief Exception thrown when a the PID file points to a live PID
class DaemonPIDExists : public Exception { class DaemonPIDExists : public Exception {
...@@ -96,7 +96,7 @@ public: ...@@ -96,7 +96,7 @@ public:
/// @param log_config JSON structures that describe logging /// @param log_config JSON structures that describe logging
/// @param storage configuration will be stored here /// @param storage configuration will be stored here
static void configureLogger(const isc::data::ConstElementPtr& log_config, static void configureLogger(const isc::data::ConstElementPtr& log_config,
const isc::dhcp::SrvConfigPtr& storage); const isc::process::ConfigPtr& storage);
/// @brief Sets or clears verbose mode /// @brief Sets or clears verbose mode
/// ///
...@@ -105,12 +105,12 @@ public: ...@@ -105,12 +105,12 @@ public:
/// config file are ignored. /// config file are ignored.
/// ///
/// @param verbose specifies if verbose should be set or not /// @param verbose specifies if verbose should be set or not
void setVerbose(const bool verbose); static void setVerbose(const bool verbose);
/// @brief Returns if running in verbose mode /// @brief Returns if running in verbose mode
/// ///
/// @return verbose mode /// @return verbose mode
bool getVerbose() const; static bool getVerbose();
/// @brief returns Kea version on stdout and exits. /// @brief returns Kea version on stdout and exits.
/// ///
...@@ -200,6 +200,19 @@ public: ...@@ -200,6 +200,19 @@ public:
/// PID of the current process is used. /// PID of the current process is used.
void createPIDFile(int pid = 0); void createPIDFile(int pid = 0);
/// @brief Returns default logger name.
static std::string getDefaultLoggerName() {
return (default_logger_name_);
}
/// @brief Sets the default logger name.
///
/// This name is used in cases when a user doesn't provide a configuration
/// for logger in the Kea configuration file.
static void setDefaultLoggerName(const std::string& logger) {
default_logger_name_ = logger;
}
protected: protected:
/// @brief Invokes handler for the next received signal. /// @brief Invokes handler for the next received signal.
...@@ -245,6 +258,12 @@ private: ...@@ -245,6 +258,12 @@ private:
/// @brief Pointer to the PID file for this process /// @brief Pointer to the PID file for this process
isc::util::PIDFilePtr pid_file_; isc::util::PIDFilePtr pid_file_;
/// @brief Indicates whether verbose mode is turned on or not.
static bool verbose_;
/// @brief Stores default logger name
static std::string default_logger_name_;
/// @brief Flag indicating if this instance created the file /// @brief Flag indicating if this instance created the file
bool am_file_author_; bool am_file_author_;
}; };
......
// Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <config.h> #include <config.h>
#include <cc/data.h> #include <cc/data.h>
#include <dhcpsrv/logging.h> #include <process/log_parser.h>
#include <boost/foreach.hpp> #include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <log/logger_specification.h> #include <log/logger_specification.h>
...@@ -18,9 +18,9 @@ using namespace isc::data; ...@@ -18,9 +18,9 @@ using namespace isc::data;
using namespace isc::log; using namespace isc::log;
namespace isc { namespace isc {
namespace dhcp { namespace process {
LogConfigParser::LogConfigParser(const SrvConfigPtr& storage) LogConfigParser::LogConfigParser(const ConfigPtr& storage)
:config_(storage), verbose_(false) { :config_(storage), verbose_(false) {
if (!storage) { if (!storage) {
isc_throw(BadValue, "LogConfigParser needs a pointer to the " isc_throw(BadValue, "LogConfigParser needs a pointer to the "
......
// Copyright (C) 2014-2015 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
...@@ -8,11 +8,12 @@ ...@@ -8,11 +8,12 @@
#define DHCPSRV_LOGGING_H #define DHCPSRV_LOGGING_H
#include <cc/data.h> #include <cc/data.h>
#include <dhcpsrv/srv_config.h> #include <process/logging_info.h>
#include <process/config_base.h>
#include <vector> #include <vector>
namespace isc { namespace isc {
namespace dhcp { namespace process {
/// @brief Configures log4cplus by translating Kea configuration structures /// @brief Configures log4cplus by translating Kea configuration structures
/// ///
...@@ -45,7 +46,7 @@ public: ...@@ -45,7 +46,7 @@ public:
/// @brief Constructor /// @brief Constructor
/// ///
/// @param storage parsed logging configuration will be stored here /// @param storage parsed logging configuration will be stored here
LogConfigParser(const SrvConfigPtr& storage); LogConfigParser(const ConfigPtr& storage);
/// @brief Parses specified configuration /// @brief Parses specified configuration
/// ///
...@@ -77,7 +78,7 @@ private: ...@@ -77,7 +78,7 @@ private:
/// @brief Configuration is stored here /// @brief Configuration is stored here
/// ///
/// LogConfigParser class uses only config_->logging_info_ field. /// LogConfigParser class uses only config_->logging_info_ field.
SrvConfigPtr config_; ConfigPtr config_;
/// @brief Verbose mode /// @brief Verbose mode
/// ///
......
// Copyright (C) 2014-2015,2017 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
#include <config.h> #include <config.h>
#include <dhcpsrv/cfgmgr.h> #include <process/logging_info.h>
#include <dhcpsrv/logging_info.h> #include <process/daemon.h>
#include <log/logger_name.h> #include <log/logger_name.h>
using namespace isc::log; using namespace isc::log;
using namespace isc::data; using namespace isc::data;
namespace isc { namespace isc {
namespace dhcp { namespace process {
bool bool
LoggingDestination::equals(const LoggingDestination& other) const { LoggingDestination::equals(const LoggingDestination& other) const {
...@@ -43,16 +43,16 @@ LoggingInfo::LoggingInfo() ...@@ -43,16 +43,16 @@ LoggingInfo::LoggingInfo()
: name_("kea"), severity_(isc::log::INFO), debuglevel_(0) { : name_("kea"), severity_(isc::log::INFO), debuglevel_(0) {
// If configuration Manager is in the verbose mode, we need to modify the // If configuration Manager is in the verbose mode, we need to modify the
// default settings. // default settings.
if (CfgMgr::instance().isVerbose()) { if (Daemon::getVerbose()) {
severity_ = isc::log::DEBUG; severity_ = isc::log::DEBUG;
debuglevel_ = 99; debuglevel_ = 99;
} }
// If the process has set the non-empty name for the default logger, // If the process has set the non-empty name for the default logger,
// let's use this name. // let's use this name.
std::string logger_name = CfgMgr::instance().getDefaultLoggerName(); std::string default_logger = Daemon::getDefaultLoggerName();
if (!logger_name.empty()) { if (!default_logger.empty()) {
name_ = logger_name; name_ = default_logger;
} }
// Add a default logging destination in case use hasn't provided a // Add a default logging destination in case use hasn't provided a
......
// Copyright (C) 2014-2015,2017 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <vector> #include <vector>
namespace isc { namespace isc {
namespace dhcp { namespace process {
/// @brief Defines single logging destination /// @brief Defines single logging destination
/// ///
...@@ -73,7 +73,7 @@ public: ...@@ -73,7 +73,7 @@ public:
/// "severity": "WARN", /// "severity": "WARN",
/// "debuglevel": 99 /// "debuglevel": 99
/// }, /// },
class LoggingInfo : public UserContext, public isc::data::CfgToElement { class LoggingInfo : public isc::data::UserContext, public isc::data::CfgToElement {
public: public:
/// @brief logging name /// @brief logging name
...@@ -133,7 +133,7 @@ public: ...@@ -133,7 +133,7 @@ public:
}; };
/// @brief storage for logging information in log4cplus format /// @brief storage for logging information in log4cplus format
typedef std::vector<isc::dhcp::LoggingInfo> LoggingInfoStorage; typedef std::vector<isc::process::LoggingInfo> LoggingInfoStorage;
} }
} }
......
...@@ -3,6 +3,7 @@ SUBDIRS = . ...@@ -3,6 +3,7 @@ SUBDIRS = .
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += $(BOOST_INCLUDES) AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/lib/process/tests\" AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_top_builddir)/src/lib/process/tests\"
AM_CPPFLAGS += -DDATA_DIR="\"$(dhcp_data_dir)\""
AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\" AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
AM_CXXFLAGS = $(KEA_CXXFLAGS) AM_CXXFLAGS = $(KEA_CXXFLAGS)
...@@ -24,6 +25,8 @@ libprocess_unittests_SOURCES = d_cfg_mgr_unittests.cc ...@@ -24,6 +25,8 @@ libprocess_unittests_SOURCES = d_cfg_mgr_unittests.cc
libprocess_unittests_SOURCES += d_controller_unittests.cc libprocess_unittests_SOURCES += d_controller_unittests.cc
libprocess_unittests_SOURCES += daemon_unittest.cc libprocess_unittests_SOURCES += daemon_unittest.cc
libprocess_unittests_SOURCES += io_service_signal_unittests.cc libprocess_unittests_SOURCES += io_service_signal_unittests.cc
libprocess_unittests_SOURCES += log_parser_unittests.cc
libprocess_unittests_SOURCES += logging_info_unittests.cc
libprocess_unittests_SOURCES += run_unittests.cc libprocess_unittests_SOURCES += run_unittests.cc
libprocess_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES) libprocess_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
...@@ -35,6 +38,7 @@ libprocess_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS) ...@@ -35,6 +38,7 @@ libprocess_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
libprocess_unittests_LDADD = $(top_builddir)/src/lib/process/testutils/libprocesstest.la libprocess_unittests_LDADD = $(top_builddir)/src/lib/process/testutils/libprocesstest.la
libprocess_unittests_LDADD += $(top_builddir)/src/lib/process/libkea-process.la libprocess_unittests_LDADD += $(top_builddir)/src/lib/process/libkea-process.la
libprocess_unittests_LDADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la libprocess_unittests_LDADD += $(top_builddir)/src/lib/cfgrpt/libcfgrpt.la
libprocess_unittests_LDADD += $(top_builddir)/src/lib/testutils/libkea-testutils.la
libprocess_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la libprocess_unittests_LDADD += $(top_builddir)/src/lib/dhcpsrv/libkea-dhcpsrv.la
libprocess_unittests_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la libprocess_unittests_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
libprocess_unittests_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la libprocess_unittests_LDADD += $(top_builddir)/src/lib/dhcp/libkea-dhcp++.la
......
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
#include <exceptions/exceptions.h> #include <exceptions/exceptions.h>
#include <cc/data.h> #include <cc/data.h>
#include <dhcpsrv/cfgmgr.h> #include <dhcpsrv/cfgmgr.h>
#include <dhcpsrv/daemon.h> #include <process/daemon.h>
#include <dhcpsrv/logging.h> #include <process/config_base.h>
#include <process/log_parser.h>
#include <log/logger_support.h> #include <log/logger_support.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
...@@ -18,11 +19,11 @@ ...@@ -18,11 +19,11 @@
#include <sys/wait.h> #include <sys/wait.h>
using namespace isc; using namespace isc;
using namespace isc::dhcp; using namespace isc::process;
using namespace isc::data; using namespace isc::data;
namespace isc { namespace isc {
namespace dhcp { namespace process {
// @brief Derived Daemon class // @brief Derived Daemon class
class DaemonImpl : public Daemon { class DaemonImpl : public Daemon {
...@@ -92,7 +93,7 @@ TEST_F(DaemonTest, constructor) { ...@@ -92,7 +93,7 @@ TEST_F(DaemonTest, constructor) {
EXPECT_TRUE(instance2.getConfigFile().empty()); EXPECT_TRUE(instance2.getConfigFile().empty());
EXPECT_TRUE(instance2.getProcName().empty()); EXPECT_TRUE(instance2.getProcName().empty());
EXPECT_EQ(CfgMgr::instance().getDataDir(),instance2.getPIDFileDir()); EXPECT_EQ(std::string(DATA_DIR), instance2.getPIDFileDir());
EXPECT_TRUE(instance2.getPIDFileName().empty()); EXPECT_TRUE(instance2.getPIDFileName().empty());
} }
...@@ -265,10 +266,10 @@ TEST_F(DaemonTest, PIDFileCleanup) { ...@@ -265,10 +266,10 @@ TEST_F(DaemonTest, PIDFileCleanup) {
// More dedicated tests are available for LogConfigParser class. // More dedicated tests are available for LogConfigParser class.
// See logger_unittest.cc // See logger_unittest.cc
TEST_F(DaemonTest, parsingConsoleOutput) { TEST_F(DaemonTest, parsingConsoleOutput) {
CfgMgr::instance().setVerbose(false); Daemon::setVerbose(false);
// Storage - parsed configuration will be stored here // Storage - parsed configuration will be stored here
SrvConfigPtr storage(new SrvConfig()); ConfigPtr storage(new ConfigBase());