[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Assert rs are added in con and con_md tests



commit 6a5528356f41cd71a8cad2c7b66dcd24d177d07b
Author: Matthew Finkel <Matthew.Finkel@xxxxxxxxx>
Date:   Wed May 27 16:37:10 2015 +0000

    Assert rs are added in con and con_md tests
---
 src/test/test_dir.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index c18b5e8..97a9200 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);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits