(t *testing.T)
| 17 | } |
| 18 | |
| 19 | func TestTokenFromKeyring(t *testing.T) { |
| 20 | // Given a keyring that contains a token for a host |
| 21 | authCfg := newTestAuthConfig(t) |
| 22 | require.NoError(t, keyring.Set(keyringServiceName("github.com"), "", "test-token")) |
| 23 | |
| 24 | // When we get the token from the auth config |
| 25 | token, err := authCfg.TokenFromKeyring("github.com") |
| 26 | |
| 27 | // Then it returns successfully with the correct token |
| 28 | require.NoError(t, err) |
| 29 | require.Equal(t, "test-token", token) |
| 30 | } |
| 31 | |
| 32 | func TestTokenFromKeyringForUser(t *testing.T) { |
| 33 | // Given a keyring that contains a token for a host with a specific user |
nothing calls this directly
no test coverage detected