MCPcopy
hub / github.com/github/github-mcp-server / TestFetcher_CustomHTTPClient

Function TestFetcher_CustomHTTPClient

pkg/scopes/fetcher_test.go:202–211  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

200}
201
202func TestFetcher_CustomHTTPClient(t *testing.T) {
203 customClient := &http.Client{Timeout: 5 * time.Second}
204
205 apiHost := testAPIHostResolver{baseURL: "https://api.github.com"}
206 fetcher := NewFetcher(apiHost, FetcherOptions{
207 HTTPClient: customClient,
208 })
209
210 assert.Equal(t, customClient, fetcher.client)
211}
212
213func TestFetcher_CustomAPIHost(t *testing.T) {
214 apiHost := testAPIHostResolver{baseURL: "https://api.github.enterprise.com"}

Callers

nothing calls this directly

Calls 1

NewFetcherFunction · 0.85

Tested by

no test coverage detected