99 "strings"
1010 "testing"
1111
12- "github.com/docker/docker/api/types"
1312 "github.com/docker/docker/api/types/swarm"
1413 "github.com/docker/docker/errdefs"
1514 "gotest.tools/v3/assert"
@@ -21,14 +20,14 @@ func TestServiceUpdateError(t *testing.T) {
2120 client : newMockClient (errorMock (http .StatusInternalServerError , "Server error" )),
2221 }
2322
24- _ , err := client .ServiceUpdate (context .Background (), "service_id" , swarm.Version {}, swarm.ServiceSpec {}, types .ServiceUpdateOptions {})
23+ _ , err := client .ServiceUpdate (context .Background (), "service_id" , swarm.Version {}, swarm.ServiceSpec {}, swarm .ServiceUpdateOptions {})
2524 assert .Check (t , is .ErrorType (err , errdefs .IsSystem ))
2625
27- _ , err = client .ServiceUpdate (context .Background (), "" , swarm.Version {}, swarm.ServiceSpec {}, types .ServiceUpdateOptions {})
26+ _ , err = client .ServiceUpdate (context .Background (), "" , swarm.Version {}, swarm.ServiceSpec {}, swarm .ServiceUpdateOptions {})
2827 assert .Check (t , is .ErrorType (err , errdefs .IsInvalidParameter ))
2928 assert .Check (t , is .ErrorContains (err , "value is empty" ))
3029
31- _ , err = client .ServiceUpdate (context .Background (), " " , swarm.Version {}, swarm.ServiceSpec {}, types .ServiceUpdateOptions {})
30+ _ , err = client .ServiceUpdate (context .Background (), " " , swarm.Version {}, swarm.ServiceSpec {}, swarm .ServiceUpdateOptions {})
3231 assert .Check (t , is .ErrorType (err , errdefs .IsInvalidParameter ))
3332 assert .Check (t , is .ErrorContains (err , "value is empty" ))
3433}
@@ -41,7 +40,7 @@ func TestServiceUpdateConnectionError(t *testing.T) {
4140 client , err := NewClientWithOpts (WithAPIVersionNegotiation (), WithHost ("tcp://no-such-host.invalid" ))
4241 assert .NilError (t , err )
4342
44- _ , err = client .ServiceUpdate (context .Background (), "service_id" , swarm.Version {}, swarm.ServiceSpec {}, types .ServiceUpdateOptions {})
43+ _ , err = client .ServiceUpdate (context .Background (), "service_id" , swarm.Version {}, swarm.ServiceSpec {}, swarm .ServiceUpdateOptions {})
4544 assert .Check (t , is .ErrorType (err , IsErrConnectionFailed ))
4645}
4746
@@ -89,7 +88,7 @@ func TestServiceUpdate(t *testing.T) {
8988 }),
9089 }
9190
92- _ , err := client .ServiceUpdate (context .Background (), "service_id" , updateCase .swarmVersion , swarm.ServiceSpec {}, types .ServiceUpdateOptions {})
91+ _ , err := client .ServiceUpdate (context .Background (), "service_id" , updateCase .swarmVersion , swarm.ServiceSpec {}, swarm .ServiceUpdateOptions {})
9392 assert .NilError (t , err )
9493 }
9594}
0 commit comments