(t *testing.T, wait client.ContainerWaitResult, expected int64, timeout time.Duration)
| 297 | } |
| 298 | |
| 299 | func assertContainerExitCode(t *testing.T, wait client.ContainerWaitResult, expected int64, timeout time.Duration) { |
| 300 | t.Helper() |
| 301 | |
| 302 | select { |
| 303 | case err := <-wait.Error: |
| 304 | assert.NilError(t, err) |
| 305 | case res := <-wait.Result: |
| 306 | assert.Check(t, is.Equal(res.StatusCode, expected)) |
| 307 | case <-time.After(timeout): |
| 308 | t.Fatal("timeout waiting for container exit") |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | func TestContainerRestartPolicyOnFailure(t *testing.T) { |
| 313 | ctx := setupTest(t) |
no test coverage detected
searching dependent graphs…