MCPcopy Index your code
hub / github.com/coder/coder / TestServerTailnet_AgentConn_OK

Function TestServerTailnet_AgentConn_OK

coderd/tailnet_test.go:38–53  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36)
37
38func TestServerTailnet_AgentConn_OK(t *testing.T) {
39 t.Parallel()
40
41 ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitMedium)
42 defer cancel()
43
44 // Connect through the ServerTailnet
45 agents, serverTailnet := setupServerTailnetAgent(t, 1)
46 a := agents[0]
47
48 conn, release, err := serverTailnet.AgentConn(ctx, a.id)
49 require.NoError(t, err)
50 defer release()
51
52 assert.True(t, conn.AwaitReachable(ctx))
53}
54
55func TestServerTailnet_AgentConn_NoSTUN(t *testing.T) {
56 t.Parallel()

Callers

nothing calls this directly

Calls 3

setupServerTailnetAgentFunction · 0.85
AgentConnMethod · 0.65
AwaitReachableMethod · 0.65

Tested by

no test coverage detected