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

Function TestFetcher_CustomAPIHost

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

Source from the content-addressed store, hash-verified

211}
212
213func TestFetcher_CustomAPIHost(t *testing.T) {
214 apiHost := testAPIHostResolver{baseURL: "https://api.github.enterprise.com"}
215 fetcher := NewFetcher(apiHost, FetcherOptions{})
216
217 apiURL, err := fetcher.apiHost.BaseRESTURL(context.Background())
218 require.NoError(t, err)
219 assert.Equal(t, "https://api.github.enterprise.com", apiURL.String())
220}
221
222func TestFetcher_ContextCancellation(t *testing.T) {
223 server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {

Callers

nothing calls this directly

Calls 3

NewFetcherFunction · 0.85
BaseRESTURLMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected