PingForTest waits for the client's DERP connection and performs the meow/meowed handshake.
(t testing.TB, s *Server, c *Client)
| 34 | // PingForTest waits for the client's DERP connection and performs the |
| 35 | // meow/meowed handshake. |
| 36 | func PingForTest(t testing.TB, s *Server, c *Client) PingResult { |
| 37 | t.Helper() |
| 38 | WaitForDERPForTest(t, s, c) |
| 39 | ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) |
| 40 | defer cancel() |
| 41 | res, err := c.Ping(ctx) |
| 42 | if err != nil { |
| 43 | t.Fatalf("Ping: %v", err) |
| 44 | } |
| 45 | return res |
| 46 | } |
no test coverage detected