commit 3f9920975f2b05c516deb892ff1b728c2a3c5146
parent a10e4d737e687fc848edbf27f2bada199545f77b
Author: Nick Mathewson <nickm@torproject.org>
Date: Mon, 21 Oct 2019 14:05:07 -0400
Remove a lot of cruft from TEST_OPTIONS_DEFAULT_VALUES.
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.
Diffstat:
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/src/test/test_options.c b/src/test/test_options.c
@@ -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) {