Made unit tests self-aware

This commit is contained in:
Pedro Pinto committed 2017-12-18 15:36:51 +00:00
1 parent d3792fa2c8
commit f73085d9c0
1 file changed
+3 -1
@@ -7,6 +7,7 @@
#include "lib/config/config.h"
#include "lib/config/protos/logging.pb.h"
#include "lib/utils/bts_assert.h"
#include "lib/utils/is_unittest_environment.h"
namespace bts {
@@ -23,7 +24,8 @@ int run_tests (std::vector<std::string> const&args)
extern int quickbus_tests; quickbus_tests=0;
extern int qb_rpc_tests; qb_rpc_tests=0;
extern int qb_pubsub_tests; qb_rpc_tests=0;
utils::internal::force_unittest_environment();
auto cfg = config::get<config::Logging> ();
cfg.mutable_console()->set_default_level("Fatal");
log::configure_logging(cfg);