@@ -10,7 +10,6 @@ import (
1010 "strings"
1111 "testing"
1212
13- "github.com/docker/docker/api/types"
1413 registrytypes "github.com/docker/docker/api/types/registry"
1514 "github.com/docker/docker/api/types/swarm"
1615 "github.com/docker/docker/errdefs"
@@ -24,7 +23,7 @@ func TestServiceCreateError(t *testing.T) {
2423 client := & Client {
2524 client : newMockClient (errorMock (http .StatusInternalServerError , "Server error" )),
2625 }
27- _ , err := client .ServiceCreate (context .Background (), swarm.ServiceSpec {}, types .ServiceCreateOptions {})
26+ _ , err := client .ServiceCreate (context .Background (), swarm.ServiceSpec {}, swarm .ServiceCreateOptions {})
2827 assert .Check (t , is .ErrorType (err , errdefs .IsSystem ))
2928}
3029
@@ -36,7 +35,7 @@ func TestServiceCreateConnectionError(t *testing.T) {
3635 client , err := NewClientWithOpts (WithAPIVersionNegotiation (), WithHost ("tcp://no-such-host.invalid" ))
3736 assert .NilError (t , err )
3837
39- _ , err = client .ServiceCreate (context .Background (), swarm.ServiceSpec {}, types .ServiceCreateOptions {})
38+ _ , err = client .ServiceCreate (context .Background (), swarm.ServiceSpec {}, swarm .ServiceCreateOptions {})
4039 assert .Check (t , is .ErrorType (err , IsErrConnectionFailed ))
4140}
4241
@@ -63,7 +62,7 @@ func TestServiceCreate(t *testing.T) {
6362 }),
6463 }
6564
66- r , err := client .ServiceCreate (context .Background (), swarm.ServiceSpec {}, types .ServiceCreateOptions {})
65+ r , err := client .ServiceCreate (context .Background (), swarm.ServiceSpec {}, swarm .ServiceCreateOptions {})
6766 assert .NilError (t , err )
6867 assert .Check (t , is .Equal (r .ID , "service_id" ))
6968}
@@ -122,7 +121,7 @@ func TestServiceCreateCompatiblePlatforms(t *testing.T) {
122121
123122 spec := swarm.ServiceSpec {TaskTemplate : swarm.TaskSpec {ContainerSpec : & swarm.ContainerSpec {Image : "foobar:1.0" }}}
124123
125- r , err := client .ServiceCreate (context .Background (), spec , types .ServiceCreateOptions {QueryRegistry : true })
124+ r , err := client .ServiceCreate (context .Background (), spec , swarm .ServiceCreateOptions {QueryRegistry : true })
126125 assert .NilError (t , err )
127126 assert .Check (t , is .Equal ("service_linux_amd64" , r .ID ))
128127}
@@ -201,7 +200,7 @@ func TestServiceCreateDigestPinning(t *testing.T) {
201200 Image : p .img ,
202201 },
203202 },
204- }, types .ServiceCreateOptions {QueryRegistry : true })
203+ }, swarm .ServiceCreateOptions {QueryRegistry : true })
205204 assert .NilError (t , err )
206205
207206 assert .Check (t , is .Equal (r .ID , "service_id" ))
0 commit comments