test total retries
(t *testing.T)
| 380 | |
| 381 | // test total retries |
| 382 | func TestGetAttestationsMaxRetries(t *testing.T) { |
| 383 | getAttestationRetryInterval = 0 |
| 384 | |
| 385 | fetcher := mockDataGenerator{ |
| 386 | NumUserAttestations: 5, |
| 387 | } |
| 388 | |
| 389 | c := &LiveClient{ |
| 390 | githubAPI: mockAPIClient{ |
| 391 | OnRESTWithNext: fetcher.OnREST500ErrorHandler(), |
| 392 | }, |
| 393 | logger: io.NewTestHandler(), |
| 394 | } |
| 395 | |
| 396 | _, err := c.GetByDigest(testFetchParamsWithRepo) |
| 397 | require.Error(t, err) |
| 398 | |
| 399 | fetcher.AssertNumberOfCalls(t, "OnREST500Error", 4) |
| 400 | } |
nothing calls this directly
no test coverage detected