# HG changeset patch # User David Demelier # Date 1503049009 -7200 # Node ID 7f2ebbb7a45d711969dae6abeb86f833e1413f51 # Parent 711575f6f686b7273485d6232bd93044074222f4 Tests: disable logs and add journal_server, closes #680 diff -r 711575f6f686 -r 7f2ebbb7a45d libirccd-test/irccd/plugin_test.cpp --- a/libirccd-test/irccd/plugin_test.cpp Fri Aug 18 10:39:40 2017 +0200 +++ b/libirccd-test/irccd/plugin_test.cpp Fri Aug 18 11:36:49 2017 +0200 @@ -28,6 +28,7 @@ #include #include #include +#include #include #include "plugin_test.hpp" @@ -35,7 +36,11 @@ namespace irccd { plugin_test::plugin_test(std::string name, std::string path) + : server_(std::make_shared("test")) { + log::set_verbose(false); + log::set_logger(std::make_unique()); + js_plugin_loader loader(irccd_); loader.add_module(std::make_unique()); @@ -52,6 +57,7 @@ plugin_ = loader.open(name, path); irccd_.plugins().add(plugin_); + irccd_.servers().add(server_); } } // !irccd diff -r 711575f6f686 -r 7f2ebbb7a45d libirccd-test/irccd/plugin_test.hpp --- a/libirccd-test/irccd/plugin_test.hpp Fri Aug 18 10:39:40 2017 +0200 +++ b/libirccd-test/irccd/plugin_test.hpp Fri Aug 18 11:36:49 2017 +0200 @@ -24,10 +24,9 @@ * \brief test fixture helper for Javascript plugins. */ -#include - #include "irccd.hpp" #include "plugin.hpp" +#include "journal_server.hpp" namespace irccd { @@ -36,10 +35,11 @@ * * Holds a plugin that is opened (but not loaded). */ -class plugin_test : public testing::Test { +class plugin_test { protected: irccd irccd_; std::shared_ptr plugin_; + std::shared_ptr server_; public: /**