MCPcopy Create free account
hub / github.com/tailscale/tailcat / PingForTest

Function PingForTest

export_test.go:36–46  ·  view source on GitHub ↗

PingForTest waits for the client's DERP connection and performs the meow/meowed handshake.

(t testing.TB, s *Server, c *Client)

Source from the content-addressed store, hash-verified

34// PingForTest waits for the client's DERP connection and performs the
35// meow/meowed handshake.
36func 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}

Callers 4

setupSSHEnvFunction · 0.92
TestTailcatFunction · 0.85
TestHalfCloseFunction · 0.85

Calls 2

WaitForDERPForTestFunction · 0.85
PingMethod · 0.80

Tested by

no test coverage detected