(t *testing.T, w http.ResponseWriter, r *http.Request)
| 307 | } |
| 308 | |
| 309 | func 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 | |
| 320 | func newCoderLogger(ctx context.Context, t *testing.T, us string, token string) (Func, func()) { |
| 321 | t.Helper() |