(t *testing.T)
| 17 | ) |
| 18 | |
| 19 | func TestContainerWaitError(t *testing.T) { |
| 20 | ctx, cancel := context.WithCancel(t.Context()) |
| 21 | defer cancel() |
| 22 | |
| 23 | client, err := New(WithMockClient(errorMock(http.StatusInternalServerError, "Server error"))) |
| 24 | assert.NilError(t, err) |
| 25 | wait := client.ContainerWait(ctx, "nothing", ContainerWaitOptions{}) |
| 26 | select { |
| 27 | case result := <-wait.Result: |
| 28 | t.Fatalf("expected to not get a wait result, got %d", result.StatusCode) |
| 29 | case err := <-wait.Error: |
| 30 | assert.Check(t, is.ErrorType(err, cerrdefs.IsInternal)) |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // TestContainerWaitConnectionError verifies that connection errors occurring |
| 35 | // during API-version negotiation are not shadowed by API-version errors. |
nothing calls this directly
no test coverage detected
searching dependent graphs…