aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-04-02 11:49:30 -0400
committerNick Mathewson <nickm@torproject.org>2013-04-18 11:04:57 -0400
commitc35ef8e6e92f1d3f4e96fc71c8db6a17b812053e (patch)
tree6aeeb44f52375b265add68280296382278f3feb4 /src/test
parente1128d905c7eae33d099e4287823fbd18f3c876e (diff)
downloadtor-c35ef8e6e92f1d3f4e96fc71c8db6a17b812053e.tar.gz
tor-c35ef8e6e92f1d3f4e96fc71c8db6a17b812053e.zip
Test improvement: include microdesc lines in our synthetic microdesc consensuses.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_dir.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index ea0011a6d4..6652ee0b3e 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -863,6 +863,13 @@ gen_routerstatus_for_v3ns(int idx, time_t now)
/* Shouldn't happen */
test_assert(0);
}
+ if (vrs) {
+ vrs->microdesc = tor_malloc_zero(sizeof(vote_microdesc_hash_t));
+ tor_asprintf(&vrs->microdesc->microdesc_hash_line,
+ "m 9,10,11,12,13,14,15,16,17 "
+ "sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa%d\n",
+ idx);
+ }
done:
return vrs;
@@ -1832,6 +1839,13 @@ gen_routerstatus_for_umbw(int idx, time_t now)
/* Shouldn't happen */
test_assert(0);
}
+ if (vrs) {
+ vrs->microdesc = tor_malloc_zero(sizeof(vote_microdesc_hash_t));
+ tor_asprintf(&vrs->microdesc->microdesc_hash_line,
+ "m 9,10,11,12,13,14,15,16,17 "
+ "sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa%d\n",
+ idx);
+ }
done:
return vrs;