(t *testing.T)
| 15 | } |
| 16 | |
| 17 | func TestPeerStoreGetByEmail(t *testing.T) { |
| 18 | ps := mustPeerStoreWithPeers(t, |
| 19 | mustPeerInfo("user@example.com", "testkey", []string{"10.0.0.2/32"}), |
| 20 | ) |
| 21 | |
| 22 | peer := ps.GetByEmail("user@example.com") |
| 23 | if peer == nil { |
| 24 | t.Fatalf("Expected peer to be returned") |
| 25 | } |
| 26 | |
| 27 | if peer.Email != "user@example.com" { |
| 28 | t.Errorf("Expected email 'user@example.com', got: %s", peer.Email) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | func TestPeerStoreGetPeerByKey(t *testing.T) { |
| 33 | ps := mustPeerStoreWithPeers(t, |
nothing calls this directly
no test coverage detected