(t *testing.T)
| 160 | } |
| 161 | |
| 162 | func TestHasEnvTokenWithEnvToken(t *testing.T) { |
| 163 | // Given we have an env token set |
| 164 | // Note that any valid env var for tokens will do, not just GH_ENTERPRISE_TOKEN |
| 165 | authCfg := newTestAuthConfig(t) |
| 166 | t.Setenv("GH_ENTERPRISE_TOKEN", "test-token") |
| 167 | |
| 168 | // When we check if it has an env token |
| 169 | hasEnvToken := authCfg.HasEnvToken() |
| 170 | |
| 171 | // Then it returns true |
| 172 | require.True(t, hasEnvToken, "expected to have env token") |
| 173 | } |
| 174 | |
| 175 | func TestHasEnvTokenWithNoEnvTokenButAConfigVar(t *testing.T) { |
| 176 | t.Skip("this test is explicitly breaking some implementation assumptions") |
nothing calls this directly
no test coverage detected