MCPcopy
hub / github.com/grafana/tempo / testBadRequestFromResponses

Function testBadRequestFromResponses

modules/frontend/search_sharder_test.go:938–946  ·  view source on GitHub ↗
(t *testing.T, resp pipeline.Responses[combiner.PipelineResponse], err error, expectedBody string)

Source from the content-addressed store, hash-verified

936}
937
938func 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
948func testBadRequest(t *testing.T, resp *http.Response, err error, expectedBody string) {
949 assert.Equal(t, http.StatusBadRequest, resp.StatusCode)

Calls 3

testBadRequestFunction · 0.85
NextMethod · 0.65
HTTPResponseMethod · 0.65

Tested by

no test coverage detected