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

Function TestServer_StartAndClose

agent/boundarylogproxy/proxy_test.go:101–118  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

99}
100
101func TestServer_StartAndClose(t *testing.T) {
102 t.Parallel()
103
104 socketPath := filepath.Join(testutil.TempDirUnixSocket(t), "boundary.sock")
105 srv := boundarylogproxy.NewServer(testutil.Logger(t), socketPath, prometheus.NewRegistry())
106
107 err := srv.Start()
108 require.NoError(t, err)
109
110 // Verify socket exists and is connectable.
111 conn, err := net.Dial("unix", socketPath)
112 require.NoError(t, err)
113 err = conn.Close()
114 require.NoError(t, err)
115
116 err = srv.Close()
117 require.NoError(t, err)
118}
119
120func TestServer_ReceiveAndForwardLogs(t *testing.T) {
121 t.Parallel()

Callers

nothing calls this directly

Calls 7

StartMethod · 0.95
CloseMethod · 0.95
TempDirUnixSocketFunction · 0.92
NewServerFunction · 0.92
LoggerFunction · 0.92
DialMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected