Skip to content

Commit

Permalink
upper case docker info details
Browse files Browse the repository at this point in the history
Signed-off-by: allencloud <allen.sun@daocloud.io>
  • Loading branch information
allencloud committed Mar 28, 2016
1 parent 4afeabf commit 276a20d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions api/client/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
ioutils.FprintfIfNotEmpty(cli.out, "Name: %s\n", info.Name)
ioutils.FprintfIfNotEmpty(cli.out, "ID: %s\n", info.ID)
fmt.Fprintf(cli.out, "Docker Root Dir: %s\n", info.DockerRootDir)
fmt.Fprintf(cli.out, "Debug mode (client): %v\n", utils.IsDebugEnabled())
fmt.Fprintf(cli.out, "Debug mode (server): %v\n", info.Debug)
fmt.Fprintf(cli.out, "Debug Mode (client): %v\n", utils.IsDebugEnabled())
fmt.Fprintf(cli.out, "Debug Mode (server): %v\n", info.Debug)

if info.Debug {
fmt.Fprintf(cli.out, " File Descriptors: %d\n", info.NFd)
Expand Down Expand Up @@ -145,11 +145,11 @@ func (cli *DockerCli) CmdInfo(args ...string) error {

ioutils.FprintfIfTrue(cli.out, "Experimental: %v\n", info.ExperimentalBuild)
if info.ClusterStore != "" {
fmt.Fprintf(cli.out, "Cluster store: %s\n", info.ClusterStore)
fmt.Fprintf(cli.out, "Cluster Store: %s\n", info.ClusterStore)
}

if info.ClusterAdvertise != "" {
fmt.Fprintf(cli.out, "Cluster advertise: %s\n", info.ClusterAdvertise)
fmt.Fprintf(cli.out, "Cluster Advertise: %s\n", info.ClusterAdvertise)
}
return nil
}
4 changes: 2 additions & 2 deletions integration-cli/docker_cli_daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2129,6 +2129,6 @@ func (s *DockerSuite) TestDaemonDiscoveryBackendConfigReload(c *check.C) {

out, err := d.Cmd("info")
c.Assert(err, checker.IsNil)
c.Assert(out, checker.Contains, fmt.Sprintf("Cluster store: consul://consuladdr:consulport/some/path"))
c.Assert(out, checker.Contains, fmt.Sprintf("Cluster advertise: 192.168.56.100:0"))
c.Assert(out, checker.Contains, fmt.Sprintf("Cluster Store: consul://consuladdr:consulport/some/path"))
c.Assert(out, checker.Contains, fmt.Sprintf("Cluster Advertise: 192.168.56.100:0"))
}
12 changes: 6 additions & 6 deletions integration-cli/docker_cli_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ func (s *DockerSuite) TestInfoDiscoveryBackend(c *check.C) {

out, err := d.Cmd("info")
c.Assert(err, checker.IsNil)
c.Assert(out, checker.Contains, fmt.Sprintf("Cluster store: %s\n", discoveryBackend))
c.Assert(out, checker.Contains, fmt.Sprintf("Cluster advertise: %s\n", discoveryAdvertise))
c.Assert(out, checker.Contains, fmt.Sprintf("Cluster Store: %s\n", discoveryBackend))
c.Assert(out, checker.Contains, fmt.Sprintf("Cluster Advertise: %s\n", discoveryAdvertise))
}

// TestInfoDiscoveryInvalidAdvertise verifies that a daemon run with
Expand Down Expand Up @@ -101,8 +101,8 @@ func (s *DockerSuite) TestInfoDiscoveryAdvertiseInterfaceName(c *check.C) {

out, err := d.Cmd("info")
c.Assert(err, checker.IsNil)
c.Assert(out, checker.Contains, fmt.Sprintf("Cluster store: %s\n", discoveryBackend))
c.Assert(out, checker.Contains, fmt.Sprintf("Cluster advertise: %s:2375\n", ip.String()))
c.Assert(out, checker.Contains, fmt.Sprintf("Cluster Store: %s\n", discoveryBackend))
c.Assert(out, checker.Contains, fmt.Sprintf("Cluster Advertise: %s:2375\n", ip.String()))
}

func (s *DockerSuite) TestInfoDisplaysRunningContainers(c *check.C) {
Expand Down Expand Up @@ -156,8 +156,8 @@ func (s *DockerSuite) TestInfoDebug(c *check.C) {

out, err := d.Cmd("--debug", "info")
c.Assert(err, checker.IsNil)
c.Assert(out, checker.Contains, "Debug mode (client): true\n")
c.Assert(out, checker.Contains, "Debug mode (server): true\n")
c.Assert(out, checker.Contains, "Debug Mode (client): true\n")
c.Assert(out, checker.Contains, "Debug Mode (server): true\n")
c.Assert(out, checker.Contains, "File Descriptors")
c.Assert(out, checker.Contains, "Goroutines")
c.Assert(out, checker.Contains, "System Time")
Expand Down

0 comments on commit 276a20d

Please sign in to comment.