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