diff --git a/integration-cli/daemon/daemon_swarm.go b/integration-cli/daemon/daemon_swarm.go index 40e6bada2a..8ac72cef0a 100644 --- a/integration-cli/daemon/daemon_swarm.go +++ b/integration-cli/daemon/daemon_swarm.go @@ -9,7 +9,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" - "github.com/docker/docker/client" + "github.com/docker/docker/errdefs" "gotest.tools/v3/assert" ) @@ -68,7 +68,7 @@ func (d *Daemon) CheckPluginRunning(plugin string) func(c *testing.T) (interface return func(c *testing.T) (interface{}, string) { apiclient := d.NewClientT(c) resp, _, err := apiclient.PluginInspectWithRaw(context.Background(), plugin) - if client.IsErrNotFound(err) { + if errdefs.IsNotFound(err) { return false, fmt.Sprintf("%v", err) } assert.NilError(c, err) @@ -81,7 +81,7 @@ func (d *Daemon) CheckPluginImage(plugin string) func(c *testing.T) (interface{} return func(c *testing.T) (interface{}, string) { apiclient := d.NewClientT(c) resp, _, err := apiclient.PluginInspectWithRaw(context.Background(), plugin) - if client.IsErrNotFound(err) { + if errdefs.IsNotFound(err) { return false, fmt.Sprintf("%v", err) } assert.NilError(c, err) diff --git a/integration-cli/docker_api_containers_test.go b/integration-cli/docker_api_containers_test.go index d89c605f51..bbb2fc4df6 100644 --- a/integration-cli/docker_api_containers_test.go +++ b/integration-cli/docker_api_containers_test.go @@ -2153,7 +2153,7 @@ func (s *DockerAPISuite) TestContainersAPICreateMountsCreate(c *testing.T) { // anonymous volumes are removed default: _, err := apiclient.VolumeInspect(ctx, mountPoint.Name) - assert.Check(c, client.IsErrNotFound(err)) + assert.Check(c, is.ErrorType(err, errdefs.IsNotFound)) } }) } diff --git a/integration-cli/docker_api_swarm_test.go b/integration-cli/docker_api_swarm_test.go index 8182f85ed8..dc3d18c828 100644 --- a/integration-cli/docker_api_swarm_test.go +++ b/integration-cli/docker_api_swarm_test.go @@ -22,7 +22,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/swarm" - "github.com/docker/docker/client" + "github.com/docker/docker/errdefs" "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/daemon" testdaemon "github.com/docker/docker/testutil/daemon" @@ -1042,5 +1042,5 @@ func (s *DockerSwarmSuite) TestAPINetworkInspectWithScope(c *testing.T) { assert.Check(c, is.Equal(resp.ID, network.ID)) _, err = apiclient.NetworkInspect(ctx, name, types.NetworkInspectOptions{Scope: "local"}) - assert.Check(c, client.IsErrNotFound(err)) + assert.Check(c, is.ErrorType(err, errdefs.IsNotFound)) }