(t *testing.T)
| 287 | } |
| 288 | |
| 289 | func TestLoginInsecureStorage(t *testing.T) { |
| 290 | // Given we are not logged in |
| 291 | authCfg := newTestAuthConfig(t) |
| 292 | |
| 293 | // When we login with insecure storage |
| 294 | insecureStorageUsed, err := authCfg.Login("github.com", "test-user", "test-token", "", false) |
| 295 | |
| 296 | // Then it returns success, notes that insecure storage was used, and stores the token in the config |
| 297 | require.NoError(t, err) |
| 298 | |
| 299 | require.True(t, insecureStorageUsed, "expected to use insecure storage") |
| 300 | requireKeyWithValue(t, authCfg.cfg, []string{hostsKey, "github.com", oauthTokenKey}, "test-token") |
| 301 | } |
| 302 | |
| 303 | func TestLoginSetsUserForProvidedHost(t *testing.T) { |
| 304 | // Given we are not logged in |
nothing calls this directly
no test coverage detected