]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove a lot of cruft from TEST_OPTIONS_DEFAULT_VALUES.
authorNick Mathewson <nickm@torproject.org>
Mon, 21 Oct 2019 18:05:07 +0000 (14:05 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 21 Oct 2019 18:12:59 +0000 (14:12 -0400)
This macro used to have a big list of "default" values that we
needed to set in the test_options tests in order to have reasonable
behavior.  But now that we initialize options objects to the default
settings in these tests, we no longer need such a long list of
things to replace.

src/test/test_options.c

index 1506e2f8a14870782a5abeb652059d416a101e33..9169ff914df47c94537dd7edea329eace1a3ff9c 100644 (file)
@@ -390,24 +390,10 @@ fixed_get_uname(void)
   return fixed_get_uname_result;
 }
 
-#define TEST_OPTIONS_OLD_VALUES   "TestingV3AuthInitialVotingInterval 1800\n" \
-  "ClientBootstrapConsensusMaxInProgressTries 3\n"
-
-#define TEST_OPTIONS_DEFAULT_VALUES TEST_OPTIONS_OLD_VALUES \
+#define TEST_OPTIONS_DEFAULT_VALUES                                     \
   "MaxClientCircuitsPending 1\n"                                        \
-  "RendPostPeriod 1000\n"                                               \
   "KeepAlivePeriod 1\n"                                                 \
-  "ConnLimit 1\n"                                                       \
-  "V3AuthVotingInterval 300\n"                                          \
-  "V3AuthVoteDelay 20\n"                                                \
-  "V3AuthDistDelay 20\n"                                                \
-  "V3AuthNIntervalsValid 3\n"                                           \
-  "ClientUseIPv4 1\n"                                                   \
-  "VirtualAddrNetworkIPv4 127.192.0.0/10\n"                             \
-  "VirtualAddrNetworkIPv6 [FE80::]/10\n"                                \
-  "UseEntryGuards 1\n"                                                  \
-  "Schedulers Vanilla\n"                                                \
-  "ClientDNSRejectInternalAddresses 1\n"
+  "ConnLimit 1\n"
 
 typedef struct {
   or_options_t *old_opt;
@@ -451,7 +437,7 @@ get_options_test_data(const char *conf)
   config_free_lines(cl);
   result->opt->LogTimeGranularity = 1;
   result->opt->TokenBucketRefillInterval = 1;
-  rv = config_get_lines(TEST_OPTIONS_OLD_VALUES, &cl, 1);
+  rv = config_get_lines("", &cl, 1);
   tt_int_op(rv, OP_EQ, 0);
   rv = config_assign(get_options_mgr(), result->def_opt, cl, 0, &msg);
   if (msg) {