Remove "Stack Orchestrator" from "docker version"

The output of this information can be confusing,
so removing until we have a better design for this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2018-06-21 15:59:43 -07:00
parent 71272dd203
commit a63252ba71
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
3 changed files with 7 additions and 31 deletions

View File

@ -1,9 +1,8 @@
Client:
Version: 18.99.5-ce
API version: 1.38
Go version: go1.10.2
Git commit: deadbeef
Built: Wed May 30 22:21:05 2018
OS/Arch: linux/amd64
Experimental: true
Stack Orchestrator: swarm
Version: 18.99.5-ce
API version: 1.38
Go version: go1.10.2
Git commit: deadbeef
Built: Wed May 30 22:21:05 2018
OS/Arch: linux/amd64
Experimental: true

View File

@ -29,7 +29,6 @@ Client:{{if ne .Platform.Name ""}} {{.Platform.Name}}{{end}}
Built: {{.BuildTime}}
OS/Arch: {{.Os}}/{{.Arch}}
Experimental: {{.Experimental}}
Stack Orchestrator: {{.StackOrchestrator}}
{{- end}}
{{- if .ServerOK}}{{with .Server}}
@ -78,7 +77,6 @@ type clientVersion struct {
Arch string
BuildTime string `json:",omitempty"`
Experimental bool
StackOrchestrator string `json:",omitempty"`
}
type kubernetesVersion struct {
@ -145,7 +143,6 @@ func runVersion(dockerCli command.Cli, opts *versionOptions) error {
Os: runtime.GOOS,
Arch: runtime.GOARCH,
Experimental: dockerCli.ClientInfo().HasExperimental,
StackOrchestrator: string(orchestrator),
},
}

View File

@ -11,7 +11,6 @@ import (
"gotest.tools/golden"
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api"
"github.com/docker/docker/api/types"
)
@ -31,20 +30,6 @@ func TestVersionWithoutServer(t *testing.T) {
assert.Assert(t, !strings.Contains(out, "Server:"), "actual: %s", out)
}
func fakeServerVersion(_ context.Context) (types.Version, error) {
return types.Version{
Version: "docker-dev",
APIVersion: api.DefaultVersion,
}, nil
}
func TestVersionWithOrchestrator(t *testing.T) {
cli := test.NewFakeCli(&fakeClient{serverVersion: fakeServerVersion})
cmd := NewVersionCommand(cli)
assert.NilError(t, cmd.Execute())
assert.Check(t, is.Contains(cleanTabs(cli.OutBuffer().String()), "Orchestrator: swarm"))
}
func TestVersionAlign(t *testing.T) {
vi := versionInfo{
Client: clientVersion{
@ -57,7 +42,6 @@ func TestVersionAlign(t *testing.T) {
Arch: "amd64",
BuildTime: "Wed May 30 22:21:05 2018",
Experimental: true,
StackOrchestrator: "swarm",
},
}
@ -68,7 +52,3 @@ func TestVersionAlign(t *testing.T) {
assert.Check(t, golden.String(cli.OutBuffer().String(), "docker-client-version.golden"))
assert.Check(t, is.Equal("", cli.ErrBuffer().String()))
}
func cleanTabs(line string) string {
return strings.Join(strings.Fields(line), " ")
}