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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user