(t *testing.T, method, uri string)
| 478 | } |
| 479 | |
| 480 | func newRequest(t *testing.T, method, uri string) *http.Request { |
| 481 | req, err := http.NewRequest(method, uri, nil) |
| 482 | if err != nil { |
| 483 | t.Fatalf("error creating request: %v", err) |
| 484 | } |
| 485 | req.RequestURI = req.URL.RequestURI() // simulate incoming request |
| 486 | return req |
| 487 | } |
| 488 | |
| 489 | func newRequestWithHeader(t *testing.T, method, uri, headerKey, headerVal string) *http.Request { |
| 490 | req := newRequest(t, method, uri) |
no outgoing calls
no test coverage detected