diff options
author | Matthew Finkel <Matthew.Finkel@gmail.com> | 2015-05-27 16:37:10 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-12-18 13:14:10 -0500 |
commit | 6a5528356f41cd71a8cad2c7b66dcd24d177d07b (patch) | |
tree | 86e712ad2a970f2b718870d5f2c606f9f0650a6e /src/test/test_dir.c | |
parent | 185c93c954ae6b0887dab20f6680ee0b82538a81 (diff) | |
download | tor-6a5528356f41cd71a8cad2c7b66dcd24d177d07b.tar.gz tor-6a5528356f41cd71a8cad2c7b66dcd24d177d07b.zip |
Assert rs are added in con and con_md tests
Diffstat (limited to 'src/test/test_dir.c')
-rw-r--r-- | src/test/test_dir.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c index c18b5e81a8..97a9200bdb 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -1920,12 +1920,20 @@ test_a_networkstatus( /* Check the routerstatuses. */ n_rs = smartlist_len(con->routerstatus_list); + tt_assert(n_rs); for (idx = 0; idx < n_rs; ++idx) { rs = smartlist_get(con->routerstatus_list, idx); tt_assert(rs); rs_test(rs, now); } + n_rs = smartlist_len(con_md->routerstatus_list); + tt_assert(n_rs); + for (idx = 0; idx < n_rs; ++idx) { + rs = smartlist_get(con_md->routerstatus_list, idx); + tt_assert(rs); + } + /* Check signatures. the first voter is a pseudo-entry with a legacy key. * The second one hasn't signed. The fourth one has signed: validate it. */ voter = smartlist_get(con->voters, 1); |