From: Matthew Finkel Date: Wed, 27 May 2015 16:37:10 +0000 (+0000) Subject: Assert rs are added in con and con_md tests X-Git-Tag: tor-0.2.8.1-alpha~90^2~3^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a5528356f41cd71a8cad2c7b66dcd24d177d07b;p=thirdparty%2Ftor.git Assert rs are added in con and con_md tests --- 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);