(t *testing.T)
| 93 | } |
| 94 | |
| 95 | func TestTokenStoredInEnv(t *testing.T) { |
| 96 | // When the user is authenticated via env var |
| 97 | authCfg := newTestAuthConfig(t) |
| 98 | t.Setenv("GH_TOKEN", "test-token") |
| 99 | |
| 100 | // When we get the token |
| 101 | token, source := authCfg.ActiveToken("github.com") |
| 102 | |
| 103 | // Then the token is successfully fetched |
| 104 | // and the source is set to the name of the env var |
| 105 | require.Equal(t, "test-token", token) |
| 106 | require.Equal(t, "GH_TOKEN", source) |
| 107 | } |
| 108 | |
| 109 | func TestTokenStoredInKeyring(t *testing.T) { |
| 110 | // When the user has logged in securely |
nothing calls this directly
no test coverage detected