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

Do not call the config endpoint if API is lower than 1.30

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2017-06-12 22:14:05 +02:00
parent f82f61efc6
commit 2128b3f112
2 changed files with 20 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import (
"strings"
"github.com/docker/cli/cli/compose/convert"
"github.com/docker/docker/api"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/swarm"
@@ -34,6 +35,13 @@ type fakeClient struct {
configRemoveFunc func(configID string) error
}
func (cli *fakeClient) ServerVersion(ctx context.Context) (types.Version, error) {
return types.Version{
Version: "docker-dev",
APIVersion: api.DefaultVersion,
}, nil
}
func (cli *fakeClient) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) {
if cli.serviceListFunc != nil {
return cli.serviceListFunc(options)