MCPcopy Create free account
hub / github.com/ContentSquare/chproxy / checkHeader

Function checkHeader

main_test.go:1361–1370  ·  view source on GitHub ↗
(t *testing.T, resp *http.Response, header string, expected string)

Source from the content-addressed store, hash-verified

1359}
1360
1361func checkHeader(t *testing.T, resp *http.Response, header string, expected string) {
1362 t.Helper()
1363
1364 h := resp.Header
1365 v := h.Get(header)
1366
1367 if v != expected {
1368 t.Fatalf("for header: %s got: %s, expected %s", header, v, expected)
1369 }
1370}
1371
1372func httpRequest(t *testing.T, request *http.Request, statusCode int) (*http.Response, error) {
1373 t.Helper()

Callers 1

TestServeFunction · 0.85

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected