getBundle retries when the HTTP request fails
(t *testing.T)
| 304 | |
| 305 | // getBundle retries when the HTTP request fails |
| 306 | func TestGetBundle_RequestFail(t *testing.T) { |
| 307 | mockHTTPClient := &reqFailHttpClient{} |
| 308 | |
| 309 | c := &LiveClient{ |
| 310 | externalHttpClient: mockHTTPClient, |
| 311 | logger: io.NewTestHandler(), |
| 312 | } |
| 313 | |
| 314 | b, err := c.getBundle("mybundleurl") |
| 315 | require.Error(t, err) |
| 316 | require.Nil(t, b) |
| 317 | mockHTTPClient.AssertNumberOfCalls(t, "OnGetReqFail", 4) |
| 318 | } |
| 319 | |
| 320 | func TestGetTrustDomain(t *testing.T) { |
| 321 | fetcher := mockMetaGenerator{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…