accd21e4 inadvertently made unit tests populate Context::config from the
environment and the user configuration. Fix this by moving code for
reading config, setting of logging, etc. into a separate method only to
be called by non-test code.
As noted by Michael Kruse in #815.
,
inode_cache(config)
#endif
+{
+}
+
+void
+Context::initialize()
{
config.read();
Logging::init(config);
Context();
~Context();
+ // Read configuration, initialize logging, etc. Typically not called from unit
+ // tests.
+ void initialize();
+
ArgsInfo args_info;
Config config;
{
Context ctx;
+ ctx.initialize();
SignalHandler signal_handler(ctx);
Finalizer finalizer([&ctx] { finalize_at_exit(ctx); });