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

Function failingRefresher

pkg/cmd/auth/refresh/refresh_test.go:1042–1048  ·  view source on GitHub ↗

failingRefresher always fails to renew, simulating a transient refresh error.

()

Source from the content-addressed store, hash-verified

1040
1041// failingRefresher always fails to renew, simulating a transient refresh error.
1042func failingRefresher() *ghmock.TokenRefresherMock {
1043 return &ghmock.TokenRefresherMock{
1044 RefreshFunc: func(_, _ string) (gh.RefreshableCredential, error) {
1045 return gh.RefreshableCredential{}, errors.New("refresh failed")
1046 },
1047 }
1048}
1049
1050// skippedRefreshConfig wraps a config so ActiveTokenWithRefresh reports a refresh skipped because the state directory
1051// is not writable, returning the stored credential alongside an error as the real implementation does.

Callers 1

Test_refreshRunFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected