stubKeyringDeleteThenReadError makes keyring deletes report success and every later keyring operation fail with err, so the read that verifies the removal fails.
(t *testing.T, err error)
| 357 | // stubKeyringDeleteThenReadError makes keyring deletes report success and every later keyring operation fail with err, |
| 358 | // so the read that verifies the removal fails. |
| 359 | func stubKeyringDeleteThenReadError(t *testing.T, err error) { |
| 360 | t.Helper() |
| 361 | original := keyringDelete |
| 362 | t.Cleanup(func() { keyringDelete = original }) |
| 363 | keyringDelete = func(string, string) error { |
| 364 | keyring.MockInitWithError(err) |
| 365 | return nil |
| 366 | } |
| 367 | } |
| 368 | |
| 369 | func TestRefreshTelemetryReportsDirectoryOverrides(t *testing.T) { |
| 370 | authCfg := newTestAuthConfig(t) |
no test coverage detected