TestExecCreateConnectionError verifies that connection errors occurring during API-version negotiation are not shadowed by API-version errors. Regression test for https://github.com/docker/cli/issues/4890
(t *testing.T)
| 36 | // |
| 37 | // Regression test for https://github.com/docker/cli/issues/4890 |
| 38 | func TestExecCreateConnectionError(t *testing.T) { |
| 39 | client, err := New(WithHost("tcp://no-such-host.invalid")) |
| 40 | assert.NilError(t, err) |
| 41 | |
| 42 | _, err = client.ExecCreate(t.Context(), "container_id", ExecCreateOptions{}) |
| 43 | assert.Check(t, is.ErrorType(err, IsErrConnectionFailed)) |
| 44 | } |
| 45 | |
| 46 | func TestExecCreate(t *testing.T) { |
| 47 | const expectedURL = "/containers/container_id/exec" |
nothing calls this directly
no test coverage detected
searching dependent graphs…