Skip to content

Commit

Permalink
Remove "Stack Orchestrator" from "docker version"
Browse files Browse the repository at this point in the history
The output of this information can be confusing,
so removing until we have a better design for this.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Jun 22, 2018
1 parent 71272dd commit 87c39da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 28 deletions.
15 changes: 7 additions & 8 deletions cli/command/system/testdata/docker-client-version.golden
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion cli/command/system/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
19 changes: 0 additions & 19 deletions cli/command/system/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand All @@ -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{
Expand All @@ -68,7 +53,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), " ")
}

0 comments on commit 87c39da

Please sign in to comment.