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

Function getOutput

agent/agentproc/api_test.go:72–82  ·  view source on GitHub ↗

getOutput sends a GET /{id}/output request and returns the recorder.

(t *testing.T, handler http.Handler, id string)

Source from the content-addressed store, hash-verified

70// getOutput sends a GET /{id}/output request and returns the
71// recorder.
72func getOutput(t *testing.T, handler http.Handler, id string) *httptest.ResponseRecorder {
73 t.Helper()
74
75 ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
76 defer cancel()
77
78 w := httptest.NewRecorder()
79 r := httptest.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("/%s/output", id), nil)
80 handler.ServeHTTP(w, r)
81 return w
82}
83
84// getOutputWithHeaders sends a GET /{id}/output request with
85// custom headers and returns the recorder.

Callers 3

waitForExitFunction · 0.85
TestProcessOutputFunction · 0.85
TestProcessLifecycleFunction · 0.85

Calls 2

HelperMethod · 0.65
ServeHTTPMethod · 0.45

Tested by

no test coverage detected