MCPcopy Create free account
hub / github.com/PasarGuard/node / mustPeerStoreWithPeers

Function mustPeerStoreWithPeers

backend/wireguard/peer_store_test.go:8–15  ·  view source on GitHub ↗
(t *testing.T, peers ...*PeerInfo)

Source from the content-addressed store, hash-verified

6)
7
8func mustPeerStoreWithPeers(t *testing.T, peers ...*PeerInfo) *PeerStore {
9 t.Helper()
10
11 ps := NewPeerStore()
12 ps.ReplaceAll(peers)
13
14 return ps
15}
16
17func TestPeerStoreGetByEmail(t *testing.T) {
18 ps := mustPeerStoreWithPeers(t,

Calls 2

ReplaceAllMethod · 0.95
NewPeerStoreFunction · 0.85

Tested by

no test coverage detected