github.com/xeptore/docker-cli@v20.10.14+incompatible/cli/command/system/client_test.go (about)

     1  package system
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/docker/docker/api/types"
     7  	"github.com/docker/docker/client"
     8  )
     9  
    10  type fakeClient struct {
    11  	client.Client
    12  
    13  	version       string
    14  	serverVersion func(ctx context.Context) (types.Version, error)
    15  }
    16  
    17  func (cli *fakeClient) ServerVersion(ctx context.Context) (types.Version, error) {
    18  	return cli.serverVersion(ctx)
    19  }
    20  
    21  func (cli *fakeClient) ClientVersion() string {
    22  	return cli.version
    23  }