MCPcopy Create free account
hub / github.com/coder/envbuilder / decodeV1Logs

Function decodeV1Logs

log/coder_internal_test.go:309–318  ·  view source on GitHub ↗
(t *testing.T, w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

307}
308
309func decodeV1Logs(t *testing.T, w http.ResponseWriter, r *http.Request) (agentsdk.PatchLogs, bool) {
310 t.Helper()
311 var req agentsdk.PatchLogs
312 err := json.NewDecoder(r.Body).Decode(&req)
313 if !assert.NoError(t, err) {
314 http.Error(w, err.Error(), http.StatusBadRequest)
315 return req, false
316 }
317 return req, true
318}
319
320func newCoderLogger(ctx context.Context, t *testing.T, us string, token string) (Func, func()) {
321 t.Helper()

Callers 1

TestCoderFunction · 0.85

Calls 1

ErrorMethod · 0.80

Tested by

no test coverage detected