diff options
| author | tv <tv@krebsco.de> | 2026-11-04 22:16:25 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-04 22:16:25 +0100 |
| commit | d587a8e7cdc0bb6ff45a413ef183ec58b3052308 (patch) | |
| tree | 6fd0a29eefd2472626c4bad5048b718b4ec95857 /src/simtest | |
| parent | f8da04220992bd64caa66522b3a689eb1b03fbbc (diff) | |
fix: test links fail over cuts by name
Diffstat (limited to 'src/simtest')
| -rw-r--r-- | src/simtest/links.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/simtest/links.rs b/src/simtest/links.rs index e8c2a36..652e3ed 100644 --- a/src/simtest/links.rs +++ b/src/simtest/links.rs @@ -203,15 +203,16 @@ async fn links_fail_over_to_another_relay() { .await; } let relayed = (c_id.clone(), vec![a_id.clone()]); - let (first, other) = if b.links.relaying().contains(&relayed) { - (&b, &d) + // With their names on the simulated net, which links are cut by. + let ((first, first_name), (other, other_name)) = if b.links.relaying().contains(&relayed) { + ((&b, "b"), (&d, "d")) } else { - (&d, &b) + ((&d, "d"), (&b, "b")) }; // The relay in use reaches c no more, nor the other relay; a still reaches it. - cut_between(first.local_id(), &c_id); - cut_between(first.local_id(), other.local_id()); + cut_between(first_name, "c"); + cut_between(first_name, other_name); let cut_at = tokio::time::Instant::now(); // a renews as a dashboard does, and gets c's links through the other relay. |
