MCPcopy Create free account
hub / github.com/cli/cli / requireExtensionHTTPError

Function requireExtensionHTTPError

pkg/cmd/extension/http_test.go:32–39  ·  view source on GitHub ↗
(t *testing.T, err error, status int)

Source from the content-addressed store, hash-verified

30}
31
32func requireExtensionHTTPError(t *testing.T, err error, status int) {
33 t.Helper()
34
35 var httpErr api.HTTPError
36 require.ErrorAs(t, err, &httpErr)
37 assert.Equal(t, status, httpErr.StatusCode)
38 assert.Contains(t, err.Error(), fmt.Sprintf("HTTP %d", status))
39}
40
41func TestRepoExists(t *testing.T) {
42 repo := ghrepo.New("OWNER", "REPO")

Callers 6

TestRepoExistsFunction · 0.85
TestHasScriptFunction · 0.85
TestFetchLatestReleaseFunction · 0.85
TestFetchReleaseFromTagFunction · 0.85
TestFetchCommitSHAFunction · 0.85
TestDownloadAssetFunction · 0.85

Calls 4

EqualMethod · 0.80
ContainsMethod · 0.80
HelperMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected