test total retries
(t *testing.T)
| 422 | |
| 423 | // test total retries |
| 424 | func TestGetAttestationsMaxRetries(t *testing.T) { |
| 425 | getAttestationRetryInterval = 0 |
| 426 | |
| 427 | fetcher := mockDataGenerator{ |
| 428 | NumUserAttestations: 5, |
| 429 | } |
| 430 | |
| 431 | c := &LiveClient{ |
| 432 | githubAPI: mockAPIClient{ |
| 433 | OnRESTWithNext: fetcher.OnREST500ErrorHandler(), |
| 434 | }, |
| 435 | logger: io.NewTestHandler(), |
| 436 | } |
| 437 | |
| 438 | _, err := c.GetByDigest(testFetchParamsWithRepo) |
| 439 | require.Error(t, err) |
| 440 | |
| 441 | fetcher.AssertNumberOfCalls(t, "OnREST500Error", 4) |
| 442 | } |
nothing calls this directly
no test coverage detected