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

Function testServer

scaletest/agentconn/run_test.go:264–275  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

262}
263
264func testServer(t *testing.T) (string, func() int64) {
265 t.Helper()
266
267 var count atomic.Int64
268 srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
269 count.Add(1)
270 w.WriteHeader(http.StatusOK)
271 }))
272 t.Cleanup(srv.Close)
273
274 return srv.URL, count.Load
275}

Callers 2

Test_RunnerFunction · 0.85
Test_Runner_TimingFunction · 0.85

Calls 4

HelperMethod · 0.65
AddMethod · 0.65
CleanupMethod · 0.65
WriteHeaderMethod · 0.45

Tested by

no test coverage detected