1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #28776 from Microsoft/jjh/fix28775

Align output of docker version again
This commit is contained in:
Brian Goff 2016-11-28 17:02:17 -05:00 committed by GitHub
commit 8c2e674551
2 changed files with 9 additions and 10 deletions

View file

@ -24,14 +24,13 @@ var versionTemplate = `Client:
OS/Arch: {{.Client.Os}}/{{.Client.Arch}}{{if .ServerOK}} OS/Arch: {{.Client.Os}}/{{.Client.Arch}}{{if .ServerOK}}
Server: Server:
Version: {{.Server.Version}} Version: {{.Server.Version}}
API version: {{.Server.APIVersion}} API version: {{.Server.APIVersion}} (minimum version {{.Server.MinAPIVersion}})
Minimum API version: {{.Server.MinAPIVersion}} Go version: {{.Server.GoVersion}}
Go version: {{.Server.GoVersion}} Git commit: {{.Server.GitCommit}}
Git commit: {{.Server.GitCommit}} Built: {{.Server.BuildTime}}
Built: {{.Server.BuildTime}} OS/Arch: {{.Server.Os}}/{{.Server.Arch}}
OS/Arch: {{.Server.Os}}/{{.Server.Arch}} Experimental: {{.Server.Experimental}}{{end}}`
Experimental: {{.Server.Experimental}}{{end}}`
type versionOptions struct { type versionOptions struct {
format string format string

View file

@ -14,7 +14,7 @@ func (s *DockerSuite) TestVersionEnsureSucceeds(c *check.C) {
"Client:": 1, "Client:": 1,
"Server:": 1, "Server:": 1,
" Version:": 2, " Version:": 2,
" API version:": 3, " API version:": 2,
" Go version:": 2, " Go version:": 2,
" Git commit:": 2, " Git commit:": 2,
" OS/Arch:": 2, " OS/Arch:": 2,
@ -40,7 +40,7 @@ func (s *DockerSuite) TestVersionPlatform_l(c *check.C) {
func testVersionPlatform(c *check.C, platform string) { func testVersionPlatform(c *check.C, platform string) {
out, _ := dockerCmd(c, "version") out, _ := dockerCmd(c, "version")
expected := "OS/Arch: " + platform expected := "OS/Arch: " + platform
split := strings.Split(out, "\n") split := strings.Split(out, "\n")
c.Assert(len(split) >= 14, checker.Equals, true, check.Commentf("got %d lines from version", len(split))) c.Assert(len(split) >= 14, checker.Equals, true, check.Commentf("got %d lines from version", len(split)))