MCPcopy
hub / github.com/grafana/dskit / checkHTTPResponse

Function checkHTTPResponse

httpgrpc/server/server_test.go:264–271  ·  view source on GitHub ↗
(t *testing.T, resp *httpgrpc.HTTPResponse, expectedCode int, expectedBody string)

Source from the content-addressed store, hash-verified

262}
263
264func checkHTTPResponse(t *testing.T, resp *httpgrpc.HTTPResponse, expectedCode int, expectedBody string) {
265 require.Equal(t, int32(expectedCode), resp.GetCode())
266 require.Equal(t, fmt.Sprintf("%s\n", expectedBody), string(resp.GetBody()))
267 hs := resp.GetHeaders()
268 for _, h := range hs {
269 require.NotEqual(t, DoNotLogErrorHeaderKey, h.Key)
270 }
271}
272
273func TestParseURL(t *testing.T) {
274 for _, tc := range []struct {

Callers 3

checkErrorFunction · 0.85

Calls 4

EqualMethod · 0.45
GetCodeMethod · 0.45
GetBodyMethod · 0.45
GetHeadersMethod · 0.45

Tested by

no test coverage detected