Expose peer cache endpoint score reasons

This commit is contained in:
2026-05-16 11:27:18 +03:00
parent 831701003c
commit 6817d150f8
3 changed files with 8 additions and 0 deletions
@@ -151,6 +151,9 @@ func TestPeerCacheAppliesEndpointHealthObservations(t *testing.T) {
if entry.BestCandidateID != "node-b-wss" || entry.Endpoint != "https://node-b.example.test:443" {
t.Fatalf("peer cache did not apply endpoint observations: %+v", entry)
}
if !containsString(entry.BestScoreReasons, "transport:wss") {
t.Fatalf("peer cache did not expose score reasons: %+v", entry.BestScoreReasons)
}
}
func TestPeerCacheUsesPreferredCorporateEndpointAddress(t *testing.T) {