failingRefresher returns a mock that always fails to refresh and records its calls.
()
| 539 | |
| 540 | // failingRefresher returns a mock that always fails to refresh and records its calls. |
| 541 | func failingRefresher() *ghmock.TokenRefresherMock { |
| 542 | return &ghmock.TokenRefresherMock{ |
| 543 | RefreshFunc: func(_ string, _ string) (gh.RefreshableCredential, error) { |
| 544 | return gh.RefreshableCredential{}, errors.New("token endpoint unreachable") |
| 545 | }, |
| 546 | } |
| 547 | } |
| 548 | |
| 549 | // expiredRefresher returns a mock whose refresh token is rejected by the server, recorded via |
| 550 | // gh.ErrRefreshTokenInvalid, and records its calls. |
no outgoing calls
no test coverage detected