From cd4c44986aaaa537232d83efe4020c2349efa65b Mon Sep 17 00:00:00 2001 From: cloudhead Date: Tue, 3 Oct 2023 13:21:48 +0200 Subject: [PATCH] node: Relax `routes_to` test function We were being too strict by requiring that no routes existed that weren't passed into the function. This isn't really useful for testing, since we're more interested in checking that certain routes are there, rather than testing that *only* those routes are there. --- radicle-node/src/test/environment.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/radicle-node/src/test/environment.rs b/radicle-node/src/test/environment.rs index b51953d9..d2cf7034 100644 --- a/radicle-node/src/test/environment.rs +++ b/radicle-node/src/test/environment.rs @@ -227,10 +227,7 @@ impl NodeHandle { for (rid, nid) in self.routing() { if !remaining.remove(&(rid, nid)) { - panic!( - "Node::routes_to: unexpected route for {}: ({rid}, {nid})", - self.id - ); + log::debug!(target: "test", "Found unexpected route for {}: ({rid}, {nid})", self.id); } } if remaining.is_empty() {