Update tests to handle new interpretation of quiet_level.

Two things needed to be changed.  First, we used to set quiet_level
to the default (QUIET_NONE) when running tests, since we would not
call anything that acted based upon it.  But since we sometimes call
options_init_logs(), we need to pre-set quiet_level to QUIET_SILENT
in the logs so that we don't add the default logs.  This did not
cause test failure: just unwanted logs.

Second, we had a test that checked whether options_validate was
messing with options->Logs correctly.  Since options_validate no
longer messes with the logs, we no longer want a test for this.
This commit is contained in:
Nick Mathewson
2019-10-17 13:23:11 -04:00
parent e07b19d305
commit 98c3b3bb4c
2 changed files with 5 additions and 4 deletions
+3
View File
@@ -272,6 +272,9 @@ main(int c, const char **v)
control_initialize_event_queue();
/* Don't add default logs; the tests manage their own. */
quiet_level = QUIET_SILENT;
for (i_out = i = 1; i < c; ++i) {
if (!strcmp(v[i], "--warn")) {
loglevel = LOG_WARN;