(t *testing.T, resp pipeline.Responses[combiner.PipelineResponse], err error, expectedBody string)
| 936 | } |
| 937 | |
| 938 | func testBadRequestFromResponses(t *testing.T, resp pipeline.Responses[combiner.PipelineResponse], err error, expectedBody string) { |
| 939 | require.NoError(t, err) |
| 940 | |
| 941 | r, done, err := resp.Next(context.Background()) |
| 942 | require.NoError(t, err) |
| 943 | require.True(t, done) // there should only be one response |
| 944 | |
| 945 | testBadRequest(t, r.HTTPResponse(), err, expectedBody) |
| 946 | } |
| 947 | |
| 948 | func testBadRequest(t *testing.T, resp *http.Response, err error, expectedBody string) { |
| 949 | assert.Equal(t, http.StatusBadRequest, resp.StatusCode) |
no test coverage detected