diff --git a/cli/command/manifest/inspect_test.go b/cli/command/manifest/inspect_test.go index 92bfd2e27a..57e7a6b003 100644 --- a/cli/command/manifest/inspect_test.go +++ b/cli/command/manifest/inspect_test.go @@ -7,7 +7,6 @@ import ( "github.com/docker/cli/cli/manifest/store" "github.com/docker/cli/cli/manifest/types" - manifesttypes "github.com/docker/cli/cli/manifest/types" "github.com/docker/cli/internal/test" "github.com/docker/distribution" "github.com/docker/distribution/manifest/schema2" @@ -80,10 +79,10 @@ func TestInspectCommandNotFound(t *testing.T) { cli := test.NewFakeCli(nil) cli.SetManifestStore(store) cli.SetRegistryClient(&fakeRegistryClient{ - getManifestFunc: func(_ context.Context, _ reference.Named) (manifesttypes.ImageManifest, error) { - return manifesttypes.ImageManifest{}, errors.New("missing") + getManifestFunc: func(_ context.Context, _ reference.Named) (types.ImageManifest, error) { + return types.ImageManifest{}, errors.New("missing") }, - getManifestListFunc: func(ctx context.Context, ref reference.Named) ([]manifesttypes.ImageManifest, error) { + getManifestListFunc: func(ctx context.Context, ref reference.Named) ([]types.ImageManifest, error) { return nil, errors.Errorf("No such manifest: %s", ref) }, }) @@ -119,7 +118,7 @@ func TestInspectcommandRemoteManifest(t *testing.T) { cli := test.NewFakeCli(nil) cli.SetManifestStore(store) cli.SetRegistryClient(&fakeRegistryClient{ - getManifestFunc: func(_ context.Context, ref reference.Named) (manifesttypes.ImageManifest, error) { + getManifestFunc: func(_ context.Context, ref reference.Named) (types.ImageManifest, error) { return fullImageManifest(t, ref), nil }, }) diff --git a/cli/command/stack/swarm/deploy_composefile.go b/cli/command/stack/swarm/deploy_composefile.go index f317662430..d574125d2c 100644 --- a/cli/command/stack/swarm/deploy_composefile.go +++ b/cli/command/stack/swarm/deploy_composefile.go @@ -12,7 +12,6 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/swarm" apiclient "github.com/docker/docker/client" - dockerclient "github.com/docker/docker/client" "github.com/pkg/errors" ) @@ -77,7 +76,7 @@ func getServicesDeclaredNetworks(serviceConfigs []composetypes.ServiceConfig) ma return serviceNetworks } -func validateExternalNetworks(ctx context.Context, client dockerclient.NetworkAPIClient, externalNetworks []string) error { +func validateExternalNetworks(ctx context.Context, client apiclient.NetworkAPIClient, externalNetworks []string) error { for _, networkName := range externalNetworks { if !container.NetworkMode(networkName).IsUserDefined() { // Networks that are not user defined always exist on all nodes as @@ -86,7 +85,7 @@ func validateExternalNetworks(ctx context.Context, client dockerclient.NetworkAP } network, err := client.NetworkInspect(ctx, networkName, types.NetworkInspectOptions{}) switch { - case dockerclient.IsErrNotFound(err): + case apiclient.IsErrNotFound(err): return errors.Errorf("network %q is declared as external, but could not be found. You need to create a swarm-scoped network before the stack is deployed", networkName) case err != nil: return err diff --git a/cli/command/trust/inspect_pretty_test.go b/cli/command/trust/inspect_pretty_test.go index 2d6e456e8a..626d5f9b6d 100644 --- a/cli/command/trust/inspect_pretty_test.go +++ b/cli/command/trust/inspect_pretty_test.go @@ -11,7 +11,7 @@ import ( "github.com/docker/cli/internal/test" notaryfake "github.com/docker/cli/internal/test/notary" "github.com/docker/docker/api/types" - dockerClient "github.com/docker/docker/client" + apiclient "github.com/docker/docker/client" "github.com/theupdateframework/notary" "github.com/theupdateframework/notary/client" "github.com/theupdateframework/notary/tuf/data" @@ -24,7 +24,7 @@ import ( // TODO(n4ss): remove common tests with the regular inspect command type fakeClient struct { - dockerClient.Client + apiclient.Client } func (c *fakeClient) Info(ctx context.Context) (types.Info, error) {