1
0
mirror of https://github.com/docker/cli.git synced 2026-01-23 15:21:32 +03:00

Fix tests with missing mocks

A recent change in moby/moby made tests with missing client mocks fail with panic.
This adds those missing mocks for the impacted tests.

Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
This commit is contained in:
Simon Ferquel
2018-11-08 11:37:49 +01:00
parent 561474d770
commit 8efa6a9567
8 changed files with 91 additions and 23 deletions

View File

@@ -179,6 +179,17 @@ func (cli *fakeClient) ConfigRemove(ctx context.Context, configID string) error
return nil
}
func (cli *fakeClient) ServiceInspectWithRaw(ctx context.Context, serviceID string, opts types.ServiceInspectOptions) (swarm.Service, []byte, error) {
return swarm.Service{
ID: serviceID,
Spec: swarm.ServiceSpec{
Annotations: swarm.Annotations{
Name: serviceID,
},
},
}, []byte{}, nil
}
func serviceFromName(name string) swarm.Service {
return swarm.Service{
ID: "ID-" + name,