mirror of
https://github.com/jmcorgan/fips.git
synced 2026-10-06 03:28:24 +00:00
The six methods connecting the live peer map to the routing core had no tests. Replacing the bloom predicate with one returning true, which disables filtering on the forwarding path entirely, left the suite green at 1718 passed, and the two tests whose names promise to cover it passed as well. The new tests assert on the real adapter through find_next_hop, which builds it internally and cannot be handed a mock. Two fixtures make them discriminate: one places two peers at equal distance and equal cost so the tie-break is the only thing separating them, and one places three peers at distinct distances so the winner depends on the coordinate values returned rather than merely on their presence. Each of the six methods was broken in turn and the intended test confirmed to fail. The break that motivated this now fails three tests where it failed none. The two misleading tests keep their assertions and gain a note saying what they do not discriminate and which test does. One of them cannot be made to discriminate without a production change: under the broken predicate it returns the same peer by a different branch, and the caller sees no branch.