mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
make Insecure registries uppercase like other keys in docker info
Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
parent
1e9b2355e4
commit
e78884dafd
2 changed files with 2 additions and 2 deletions
|
@ -153,7 +153,7 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if info.RegistryConfig != nil && (len(info.RegistryConfig.InsecureRegistryCIDRs) > 0 || len(info.RegistryConfig.IndexConfigs) > 0) {
|
if info.RegistryConfig != nil && (len(info.RegistryConfig.InsecureRegistryCIDRs) > 0 || len(info.RegistryConfig.IndexConfigs) > 0) {
|
||||||
fmt.Fprintln(cli.out, "Insecure registries:")
|
fmt.Fprintln(cli.out, "Insecure Registries:")
|
||||||
for _, registry := range info.RegistryConfig.IndexConfigs {
|
for _, registry := range info.RegistryConfig.IndexConfigs {
|
||||||
if registry.Secure == false {
|
if registry.Secure == false {
|
||||||
fmt.Fprintf(cli.out, " %s\n", registry.Name)
|
fmt.Fprintf(cli.out, " %s\n", registry.Name)
|
||||||
|
|
|
@ -178,7 +178,7 @@ func (s *DockerSuite) TestInsecureRegistries(c *check.C) {
|
||||||
|
|
||||||
out, err := d.Cmd("info")
|
out, err := d.Cmd("info")
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
c.Assert(out, checker.Contains, "Insecure registries:\n")
|
c.Assert(out, checker.Contains, "Insecure Registries:\n")
|
||||||
c.Assert(out, checker.Contains, fmt.Sprintf(" %s\n", registryHost))
|
c.Assert(out, checker.Contains, fmt.Sprintf(" %s\n", registryHost))
|
||||||
c.Assert(out, checker.Contains, fmt.Sprintf(" %s\n", registryCIDR))
|
c.Assert(out, checker.Contains, fmt.Sprintf(" %s\n", registryCIDR))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue