newTestRequest is a tiny helper that builds an outgoing request with minimal boilerplate at every call site. Callers that need to inspect the request after Apply runs use the returned pointer directly.
(t *testing.T, url string)
| 15 | // minimal boilerplate at every call site. Callers that need to inspect |
| 16 | // the request after Apply runs use the returned pointer directly. |
| 17 | func newTestRequest(t *testing.T, url string) *http.Request { |
| 18 | t.Helper() |
| 19 | req, err := http.NewRequest("GET", url, nil) |
| 20 | if err != nil { |
| 21 | t.Fatalf("new request: %v", err) |
| 22 | } |
| 23 | return req |
| 24 | } |
| 25 | |
| 26 | func TestNoopAuth(t *testing.T) { |
| 27 | p, err := NewAuthProvider(AuthConfig{}, nil) |
no outgoing calls
no test coverage detected