peerManagerWith returns a PeerManager with the given peer addresses hardcoded, skipping DNS resolution entirely.
(peers []string)
| 54 | srv := httptest.NewServer(mux) |
| 55 | t.Cleanup(srv.Close) |
| 56 | return strings.TrimPrefix(srv.URL, "http://") |
| 57 | } |
| 58 | |
| 59 | // peerManagerWith returns a PeerManager with the given peer addresses hardcoded, |
| 60 | // skipping DNS resolution entirely. |
| 61 | func peerManagerWith(peers []string) *PeerManager { |
| 62 | pm := NewPeerManager("test.svc", ":8081") |
| 63 | pm.peers = peers |
no test coverage detected