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

Function expiredRefreshableCredentialForHost

pkg/cmd/auth/logout/logout_test.go:1328–1336  ·  view source on GitHub ↗
(hostname string, secure bool)

Source from the content-addressed store, hash-verified

1326}
1327
1328func expiredRefreshableCredentialForHost(hostname string, secure bool) func(*testing.T, gh.Config) {
1329 return func(t *testing.T, cfg gh.Config) {
1330 t.Helper()
1331 _, err := cfg.Authentication().LoginRefreshable(hostname, "monalisa", gh.Credential{
1332 Token: "gho_saved", RefreshToken: "ghr_saved", ExpiresAt: new(time.Unix(1, 0)),
1333 }, "ssh", secure)
1334 require.NoError(t, err)
1335 }
1336}
1337
1338func hasSavedPair(hostname, accessToken, refreshToken, source string) tokenAssertion {
1339 return func(t *testing.T, cfg gh.Config) {

Callers 2

Test_logoutRun_nonttyFunction · 0.85

Calls 3

HelperMethod · 0.65
LoginRefreshableMethod · 0.65
AuthenticationMethod · 0.65

Tested by

no test coverage detected