mirror of https://github.com/docker/cli.git
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:
parent
71272dd203
commit
a63252ba71
|
@ -6,4 +6,3 @@ Client:
|
|||
Built: Wed May 30 22:21:05 2018
|
||||
OS/Arch: linux/amd64
|
||||
Experimental: true
|
||||
Stack Orchestrator: swarm
|
||||
|
|
|
@ -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),
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -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), " ")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue