@@ -10,7 +10,6 @@ import (
1010
1111 "github.com/docker/cli/internal/test"
1212 "github.com/docker/cli/internal/test/builders"
13- "github.com/docker/docker/api/types"
1413 "github.com/docker/docker/api/types/swarm"
1514 "github.com/docker/docker/api/types/system"
1615 "gotest.tools/v3/assert"
@@ -23,7 +22,7 @@ func TestNodePsErrors(t *testing.T) {
2322 flags map [string ]string
2423 infoFunc func () (system.Info , error )
2524 nodeInspectFunc func () (swarm.Node , []byte , error )
26- taskListFunc func (options types .TaskListOptions ) ([]swarm.Task , error )
25+ taskListFunc func (options swarm .TaskListOptions ) ([]swarm.Task , error )
2726 taskInspectFunc func (taskID string ) (swarm.Task , []byte , error )
2827 expectedError string
2928 }{
@@ -42,7 +41,7 @@ func TestNodePsErrors(t *testing.T) {
4241 },
4342 {
4443 args : []string {"nodeID" },
45- taskListFunc : func (options types .TaskListOptions ) ([]swarm.Task , error ) {
44+ taskListFunc : func (options swarm .TaskListOptions ) ([]swarm.Task , error ) {
4645 return []swarm.Task {}, errors .New ("error returning the task list" )
4746 },
4847 expectedError : "error returning the task list" ,
@@ -73,17 +72,17 @@ func TestNodePs(t *testing.T) {
7372 flags map [string ]string
7473 infoFunc func () (system.Info , error )
7574 nodeInspectFunc func () (swarm.Node , []byte , error )
76- taskListFunc func (options types .TaskListOptions ) ([]swarm.Task , error )
75+ taskListFunc func (options swarm .TaskListOptions ) ([]swarm.Task , error )
7776 taskInspectFunc func (taskID string ) (swarm.Task , []byte , error )
78- serviceInspectFunc func (ctx context.Context , serviceID string , opts types .ServiceInspectOptions ) (swarm.Service , []byte , error )
77+ serviceInspectFunc func (ctx context.Context , serviceID string , opts swarm .ServiceInspectOptions ) (swarm.Service , []byte , error )
7978 }{
8079 {
8180 name : "simple" ,
8281 args : []string {"nodeID" },
8382 nodeInspectFunc : func () (swarm.Node , []byte , error ) {
8483 return * builders .Node (), []byte {}, nil
8584 },
86- taskListFunc : func (options types .TaskListOptions ) ([]swarm.Task , error ) {
85+ taskListFunc : func (options swarm .TaskListOptions ) ([]swarm.Task , error ) {
8786 return []swarm.Task {
8887 * builders .Task (builders .WithStatus (builders .Timestamp (time .Now ().Add (- 2 * time .Hour )), builders .PortStatus ([]swarm.PortConfig {
8988 {
@@ -94,7 +93,7 @@ func TestNodePs(t *testing.T) {
9493 }))),
9594 }, nil
9695 },
97- serviceInspectFunc : func (ctx context.Context , serviceID string , opts types .ServiceInspectOptions ) (swarm.Service , []byte , error ) {
96+ serviceInspectFunc : func (ctx context.Context , serviceID string , opts swarm .ServiceInspectOptions ) (swarm.Service , []byte , error ) {
9897 return swarm.Service {
9998 ID : serviceID ,
10099 Spec : swarm.ServiceSpec {
@@ -111,7 +110,7 @@ func TestNodePs(t *testing.T) {
111110 nodeInspectFunc : func () (swarm.Node , []byte , error ) {
112111 return * builders .Node (), []byte {}, nil
113112 },
114- taskListFunc : func (options types .TaskListOptions ) ([]swarm.Task , error ) {
113+ taskListFunc : func (options swarm .TaskListOptions ) ([]swarm.Task , error ) {
115114 return []swarm.Task {
116115 * builders .Task (builders .TaskID ("taskID1" ), builders .TaskServiceID ("failure" ),
117116 builders .WithStatus (builders .Timestamp (time .Now ().Add (- 2 * time .Hour )), builders .StatusErr ("a task error" ))),
@@ -121,7 +120,7 @@ func TestNodePs(t *testing.T) {
121120 builders .WithStatus (builders .Timestamp (time .Now ().Add (- 4 * time .Hour )), builders .StatusErr ("a task error" ))),
122121 }, nil
123122 },
124- serviceInspectFunc : func (ctx context.Context , serviceID string , opts types .ServiceInspectOptions ) (swarm.Service , []byte , error ) {
123+ serviceInspectFunc : func (ctx context.Context , serviceID string , opts swarm .ServiceInspectOptions ) (swarm.Service , []byte , error ) {
125124 return swarm.Service {
126125 ID : serviceID ,
127126 Spec : swarm.ServiceSpec {
0 commit comments