aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_dir_common.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-10-16 07:40:54 -0400
committerNick Mathewson <nickm@torproject.org>2020-10-16 07:40:54 -0400
commit6d419a3da31162db989943e98fbb8de3f03b0020 (patch)
tree367f29c076f5bda7fcc606ac6f7abdca804e13a1 /src/test/test_dir_common.c
parente934d713b3847401ee08581dae88bb4a4eea5c14 (diff)
downloadtor-6d419a3da31162db989943e98fbb8de3f03b0020.tar.gz
tor-6d419a3da31162db989943e98fbb8de3f03b0020.zip
test_dir_common: make sure we include pr lines. Fixes 7 tests.
Diffstat (limited to 'src/test/test_dir_common.c')
-rw-r--r--src/test/test_dir_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test_dir_common.c b/src/test/test_dir_common.c
index 6eb4fb6d43..77e3851183 100644
--- a/src/test/test_dir_common.c
+++ b/src/test/test_dir_common.c
@@ -104,6 +104,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now)
rs->is_flagged_running = 1;
rs->is_v2_dir = 1;
rs->is_valid = 1; /* xxxxx */
+ vrs->protocols = tor_strdup("Link=7 HSDir=3");
break;
case 1:
/* Generate the second routerstatus. */
@@ -122,6 +123,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now)
rs->ipv6_orport = 4711;
rs->is_exit = rs->is_stable = rs->is_fast = rs->is_flagged_running =
rs->is_valid = rs->is_possible_guard = rs->is_v2_dir = 1;
+ vrs->protocols = tor_strdup("Link=3,4 HSDir=2,3");
break;
case 2:
/* Generate the third routerstatus. */
@@ -138,6 +140,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now)
rs->is_authority = rs->is_exit = rs->is_stable = rs->is_fast =
rs->is_flagged_running = rs->is_valid = rs->is_v2_dir =
rs->is_possible_guard = 1;
+ vrs->protocols = tor_strdup("Link=3,4 HSDir=2,3");
break;
case 3:
/* Generate a fourth routerstatus that is not running. */
@@ -152,6 +155,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now)
rs->ipv4_orport = 500;
rs->ipv4_dirport = 1999;
rs->is_v2_dir = 1;
+ vrs->protocols = tor_strdup("Link=3,4 HSDir=3");
/* Running flag (and others) cleared */
break;
case 4: