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