getList sends a GET /list request and returns the recorder.
(t *testing.T, handler http.Handler)
| 56 | |
| 57 | // getList sends a GET /list request and returns the recorder. |
| 58 | func getList(t *testing.T, handler http.Handler) *httptest.ResponseRecorder { |
| 59 | t.Helper() |
| 60 | |
| 61 | ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong) |
| 62 | defer cancel() |
| 63 | |
| 64 | w := httptest.NewRecorder() |
| 65 | r := httptest.NewRequestWithContext(ctx, http.MethodGet, "/list", nil) |
| 66 | handler.ServeHTTP(w, r) |
| 67 | return w |
| 68 | } |
| 69 | |
| 70 | // getOutput sends a GET /{id}/output request and returns the |
| 71 | // recorder. |
no test coverage detected