getBundle does not retry when the function fails with a permanent backoff error condition
(t *testing.T)
| 288 | |
| 289 | // getBundle does not retry when the function fails with a permanent backoff error condition |
| 290 | func TestGetBundle_PermanentBackoffFail(t *testing.T) { |
| 291 | mockHTTPClient := &invalidBundleClient{} |
| 292 | c := &LiveClient{ |
| 293 | externalHttpClient: mockHTTPClient, |
| 294 | logger: io.NewTestHandler(), |
| 295 | } |
| 296 | |
| 297 | b, err := c.getBundle("mybundleurl") |
| 298 | // var permanent *backoff.PermanentError |
| 299 | //require.IsType(t, &backoff.PermanentError{}, err) |
| 300 | require.Error(t, err) |
| 301 | require.Nil(t, b) |
| 302 | mockHTTPClient.AssertNumberOfCalls(t, "OnGetInvalidBundle", 1) |
| 303 | } |
| 304 | |
| 305 | // getBundle retries when the HTTP request fails |
| 306 | func TestGetBundle_RequestFail(t *testing.T) { |
nothing calls this directly
no test coverage detected