Function
checkHeader
(t *testing.T, resp *http.Response, header string, expected string)
Source from the content-addressed store, hash-verified
| 1359 | } |
| 1360 | |
| 1361 | func 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 | |
| 1372 | func httpRequest(t *testing.T, request *http.Request, statusCode int) (*http.Response, error) { |
| 1373 | t.Helper() |
Tested by
no test coverage detected