[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] test_dir_common: make sure we include pr lines. Fixes 7 tests.
commit 6d419a3da31162db989943e98fbb8de3f03b0020
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Fri Oct 16 07:40:54 2020 -0400
test_dir_common: make sure we include pr lines. Fixes 7 tests.
---
src/test/test_dir_common.c | 4 ++++
src/test/test_routerlist.c | 4 +---
2 files changed, 5 insertions(+), 3 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:
diff --git a/src/test/test_routerlist.c b/src/test/test_routerlist.c
index 91a75d7080..c7b65006f0 100644
--- a/src/test/test_routerlist.c
+++ b/src/test/test_routerlist.c
@@ -52,8 +52,6 @@
#include "test/test_dir_common.h"
#include "test/log_test_helpers.h"
-void construct_consensus(char **consensus_text_md, time_t now);
-
static authority_cert_t *mock_cert;
static authority_cert_t *
@@ -150,7 +148,7 @@ test_routerlist_launch_descriptor_downloads(void *arg)
smartlist_free(downloadable);
}
-void
+static void
construct_consensus(char **consensus_text_md, time_t now)
{
networkstatus_t *vote = NULL;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits