mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
[nit] integration-cli: obey Go's naming convention
No substantial code change. - Api --> API - Cli --> CLI - Http, Https --> HTTP, HTTPS - Id --> ID - Uid,Gid,Pid --> UID,PID,PID - Ipam --> IPAM - Tls --> TLS (TestDaemonNoTlsCliTlsVerifyWithEnv --> TestDaemonTLSVerifyIssue13964) Didn't touch in this commit: - Git: because it is officially "Git": https://git-scm.com/ - Tar: because it is officially "Tar": https://www.gnu.org/software/tar/ - Cpu, Nat, Mac, Ipc, Shm: for keeping a consistency with existing production code (not changable, for compatibility) Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/go-check/check"
|
||||
)
|
||||
|
||||
func (s *DockerSuite) TestInspectApiContainerResponse(c *check.C) {
|
||||
func (s *DockerSuite) TestInspectAPIContainerResponse(c *check.C) {
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "true")
|
||||
|
||||
cleanedContainerID := strings.TrimSpace(out)
|
||||
@@ -56,7 +56,7 @@ func (s *DockerSuite) TestInspectApiContainerResponse(c *check.C) {
|
||||
}
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestInspectApiContainerVolumeDriverLegacy(c *check.C) {
|
||||
func (s *DockerSuite) TestInspectAPIContainerVolumeDriverLegacy(c *check.C) {
|
||||
// No legacy implications for Windows
|
||||
testRequires(c, DaemonIsLinux)
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "true")
|
||||
@@ -75,11 +75,11 @@ func (s *DockerSuite) TestInspectApiContainerVolumeDriverLegacy(c *check.C) {
|
||||
c.Assert(ok, checker.True, check.Commentf("Unable to find 'Config'"))
|
||||
cfg := config.(map[string]interface{})
|
||||
_, ok = cfg["VolumeDriver"]
|
||||
c.Assert(ok, checker.True, check.Commentf("Api version %s expected to include VolumeDriver in 'Config'", version))
|
||||
c.Assert(ok, checker.True, check.Commentf("API version %s expected to include VolumeDriver in 'Config'", version))
|
||||
}
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestInspectApiContainerVolumeDriver(c *check.C) {
|
||||
func (s *DockerSuite) TestInspectAPIContainerVolumeDriver(c *check.C) {
|
||||
out, _ := dockerCmd(c, "run", "-d", "--volume-driver", "local", "busybox", "true")
|
||||
|
||||
cleanedContainerID := strings.TrimSpace(out)
|
||||
@@ -94,16 +94,16 @@ func (s *DockerSuite) TestInspectApiContainerVolumeDriver(c *check.C) {
|
||||
c.Assert(ok, checker.True, check.Commentf("Unable to find 'Config'"))
|
||||
cfg := config.(map[string]interface{})
|
||||
_, ok = cfg["VolumeDriver"]
|
||||
c.Assert(ok, checker.False, check.Commentf("Api version 1.21 expected to not include VolumeDriver in 'Config'"))
|
||||
c.Assert(ok, checker.False, check.Commentf("API version 1.21 expected to not include VolumeDriver in 'Config'"))
|
||||
|
||||
config, ok = inspectJSON["HostConfig"]
|
||||
c.Assert(ok, checker.True, check.Commentf("Unable to find 'HostConfig'"))
|
||||
cfg = config.(map[string]interface{})
|
||||
_, ok = cfg["VolumeDriver"]
|
||||
c.Assert(ok, checker.True, check.Commentf("Api version 1.21 expected to include VolumeDriver in 'HostConfig'"))
|
||||
c.Assert(ok, checker.True, check.Commentf("API version 1.21 expected to include VolumeDriver in 'HostConfig'"))
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestInspectApiImageResponse(c *check.C) {
|
||||
func (s *DockerSuite) TestInspectAPIImageResponse(c *check.C) {
|
||||
dockerCmd(c, "tag", "busybox:latest", "busybox:mytag")
|
||||
|
||||
endpoint := "/images/busybox/json"
|
||||
@@ -122,7 +122,7 @@ func (s *DockerSuite) TestInspectApiImageResponse(c *check.C) {
|
||||
}
|
||||
|
||||
// #17131, #17139, #17173
|
||||
func (s *DockerSuite) TestInspectApiEmptyFieldsInConfigPre121(c *check.C) {
|
||||
func (s *DockerSuite) TestInspectAPIEmptyFieldsInConfigPre121(c *check.C) {
|
||||
// Not relevant on Windows
|
||||
testRequires(c, DaemonIsLinux)
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "true")
|
||||
@@ -141,12 +141,12 @@ func (s *DockerSuite) TestInspectApiEmptyFieldsInConfigPre121(c *check.C) {
|
||||
cfg := config.(map[string]interface{})
|
||||
for _, f := range []string{"MacAddress", "NetworkDisabled", "ExposedPorts"} {
|
||||
_, ok := cfg[f]
|
||||
c.Check(ok, checker.True, check.Commentf("Api version %s expected to include %s in 'Config'", version, f))
|
||||
c.Check(ok, checker.True, check.Commentf("API version %s expected to include %s in 'Config'", version, f))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestInspectApiBridgeNetworkSettings120(c *check.C) {
|
||||
func (s *DockerSuite) TestInspectAPIBridgeNetworkSettings120(c *check.C) {
|
||||
// Not relevant on Windows, and besides it doesn't have any bridge network settings
|
||||
testRequires(c, DaemonIsLinux)
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "top")
|
||||
@@ -163,7 +163,7 @@ func (s *DockerSuite) TestInspectApiBridgeNetworkSettings120(c *check.C) {
|
||||
c.Assert(settings.IPAddress, checker.Not(checker.HasLen), 0)
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestInspectApiBridgeNetworkSettings121(c *check.C) {
|
||||
func (s *DockerSuite) TestInspectAPIBridgeNetworkSettings121(c *check.C) {
|
||||
// Windows doesn't have any bridge network settings
|
||||
testRequires(c, DaemonIsLinux)
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "top")
|
||||
|
||||
Reference in New Issue
Block a user