2017-07-15 19:03:17 -04:00
|
|
|
package system
|
|
|
|
|
|
|
|
import (
|
2018-05-03 21:02:44 -04:00
|
|
|
"context"
|
|
|
|
|
2017-12-05 09:41:03 -05:00
|
|
|
"github.com/docker/docker/api/types"
|
2017-07-15 19:03:17 -04:00
|
|
|
"github.com/docker/docker/client"
|
|
|
|
)
|
|
|
|
|
|
|
|
type fakeClient struct {
|
|
|
|
client.Client
|
|
|
|
|
2017-12-05 09:41:03 -05:00
|
|
|
version string
|
|
|
|
serverVersion func(ctx context.Context) (types.Version, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (cli *fakeClient) ServerVersion(ctx context.Context) (types.Version, error) {
|
|
|
|
return cli.serverVersion(ctx)
|
2017-07-15 19:03:17 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (cli *fakeClient) ClientVersion() string {
|
|
|
|
return cli.version
|
|
|
|
}
|