MCPcopy
hub / github.com/dosco/graphjin / newTestRequest

Function newTestRequest

core/openapi/auth_test.go:17–24  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

15// minimal boilerplate at every call site. Callers that need to inspect
16// the request after Apply runs use the returned pointer directly.
17func 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
26func TestNoopAuth(t *testing.T) {
27 p, err := NewAuthProvider(AuthConfig{}, nil)

Callers 8

TestNoopAuthFunction · 0.85
TestBearerAuthStaticFunction · 0.85
TestBasicAuthFunction · 0.85
TestApiKeyAuthHeaderFunction · 0.85
TestApiKeyAuthQueryFunction · 0.85
TestTokenExchangeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected