aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_options.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-21 14:05:07 -0400
committerNick Mathewson <nickm@torproject.org>2019-10-21 14:12:59 -0400
commit3f9920975f2b05c516deb892ff1b728c2a3c5146 (patch)
treecf89a7ad0a17f5c01794223c45fd27a26b4a2727 /src/test/test_options.c
parenta10e4d737e687fc848edbf27f2bada199545f77b (diff)
downloadtor-3f9920975f2b05c516deb892ff1b728c2a3c5146.tar.gz
tor-3f9920975f2b05c516deb892ff1b728c2a3c5146.zip
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 (limited to 'src/test/test_options.c')
-rw-r--r--src/test/test_options.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/test/test_options.c b/src/test/test_options.c
index 1506e2f8a1..9169ff914d 100644
--- 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) {