|
@@ -30,7 +30,7 @@ import (
|
|
|
"github.com/go-check/check"
|
|
|
)
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiGetAll(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIGetAll(c *check.C) {
|
|
|
startCount, err := getContainerCount()
|
|
|
c.Assert(err, checker.IsNil, check.Commentf("Cannot query container count"))
|
|
|
|
|
@@ -54,7 +54,7 @@ func (s *DockerSuite) TestContainerApiGetAll(c *check.C) {
|
|
|
}
|
|
|
|
|
|
// regression test for empty json field being omitted #13691
|
|
|
-func (s *DockerSuite) TestContainerApiGetJSONNoFieldsOmitted(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIGetJSONNoFieldsOmitted(c *check.C) {
|
|
|
dockerCmd(c, "run", "busybox", "true")
|
|
|
|
|
|
status, body, err := sockRequest("GET", "/containers/json?all=1", nil)
|
|
@@ -91,7 +91,7 @@ type containerPs struct {
|
|
|
}
|
|
|
|
|
|
// regression test for non-empty fields from #13901
|
|
|
-func (s *DockerSuite) TestContainerApiPsOmitFields(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIPsOmitFields(c *check.C) {
|
|
|
// Problematic for Windows porting due to networking not yet being passed back
|
|
|
testRequires(c, DaemonIsLinux)
|
|
|
name := "pstest"
|
|
@@ -124,7 +124,7 @@ func (s *DockerSuite) TestContainerApiPsOmitFields(c *check.C) {
|
|
|
c.Assert(ok, checker.Not(checker.Equals), true)
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiGetExport(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIGetExport(c *check.C) {
|
|
|
// TODO: Investigate why this fails on Windows to Windows CI
|
|
|
testRequires(c, DaemonIsLinux)
|
|
|
name := "exportcontainer"
|
|
@@ -148,7 +148,7 @@ func (s *DockerSuite) TestContainerApiGetExport(c *check.C) {
|
|
|
c.Assert(found, checker.True, check.Commentf("The created test file has not been found in the exported image"))
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiGetChanges(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIGetChanges(c *check.C) {
|
|
|
// Not supported on Windows as Windows does not support docker diff (/containers/name/changes)
|
|
|
testRequires(c, DaemonIsLinux)
|
|
|
name := "changescontainer"
|
|
@@ -343,7 +343,7 @@ func (s *DockerSuite) TestGetStoppedContainerStats(c *check.C) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiPause(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIPause(c *check.C) {
|
|
|
// Problematic on Windows as Windows does not support pause
|
|
|
testRequires(c, DaemonIsLinux)
|
|
|
defer unpauseAllContainers()
|
|
@@ -370,7 +370,7 @@ func (s *DockerSuite) TestContainerApiPause(c *check.C) {
|
|
|
c.Assert(pausedContainers, checker.IsNil, check.Commentf("There should be no paused container."))
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiTop(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPITop(c *check.C) {
|
|
|
// Problematic on Windows as Windows does not support top
|
|
|
testRequires(c, DaemonIsLinux)
|
|
|
out, _ := dockerCmd(c, "run", "-d", "busybox", "/bin/sh", "-c", "top")
|
|
@@ -396,7 +396,7 @@ func (s *DockerSuite) TestContainerApiTop(c *check.C) {
|
|
|
c.Assert(top.Processes[1][10], checker.Equals, "top")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCommit(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICommit(c *check.C) {
|
|
|
cName := "testapicommit"
|
|
|
dockerCmd(c, "run", "--name="+cName, "busybox", "/bin/sh", "-c", "touch /test")
|
|
|
|
|
@@ -418,7 +418,7 @@ func (s *DockerSuite) TestContainerApiCommit(c *check.C) {
|
|
|
dockerCmd(c, "run", img.ID, "ls", "/test")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCommitWithLabelInConfig(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICommitWithLabelInConfig(c *check.C) {
|
|
|
cName := "testapicommitwithconfig"
|
|
|
dockerCmd(c, "run", "--name="+cName, "busybox", "/bin/sh", "-c", "touch /test")
|
|
|
|
|
@@ -450,7 +450,7 @@ func (s *DockerSuite) TestContainerApiCommitWithLabelInConfig(c *check.C) {
|
|
|
dockerCmd(c, "run", img.ID, "ls", "/test")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiBadPort(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIBadPort(c *check.C) {
|
|
|
// TODO Windows to Windows CI - Port this test
|
|
|
testRequires(c, DaemonIsLinux)
|
|
|
config := map[string]interface{}{
|
|
@@ -475,7 +475,7 @@ func (s *DockerSuite) TestContainerApiBadPort(c *check.C) {
|
|
|
c.Assert(getErrorMessage(c, body), checker.Equals, `invalid port specification: "aa80"`, check.Commentf("Incorrect error msg: %s", body))
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCreate(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICreate(c *check.C) {
|
|
|
config := map[string]interface{}{
|
|
|
"Image": "busybox",
|
|
|
"Cmd": []string{"/bin/sh", "-c", "touch /test && ls /test"},
|
|
@@ -495,7 +495,7 @@ func (s *DockerSuite) TestContainerApiCreate(c *check.C) {
|
|
|
c.Assert(strings.TrimSpace(out), checker.Equals, "/test")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCreateEmptyConfig(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICreateEmptyConfig(c *check.C) {
|
|
|
config := map[string]interface{}{}
|
|
|
|
|
|
status, body, err := sockRequest("POST", "/containers/create", config)
|
|
@@ -506,7 +506,7 @@ func (s *DockerSuite) TestContainerApiCreateEmptyConfig(c *check.C) {
|
|
|
c.Assert(getErrorMessage(c, body), checker.Equals, expected)
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCreateMultipleNetworksConfig(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICreateMultipleNetworksConfig(c *check.C) {
|
|
|
// Container creation must fail if client specified configurations for more than one network
|
|
|
config := map[string]interface{}{
|
|
|
"Image": "busybox",
|
|
@@ -530,7 +530,7 @@ func (s *DockerSuite) TestContainerApiCreateMultipleNetworksConfig(c *check.C) {
|
|
|
c.Assert(msg, checker.Contains, "net3")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCreateWithHostName(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICreateWithHostName(c *check.C) {
|
|
|
hostName := "test-host"
|
|
|
config := map[string]interface{}{
|
|
|
"Image": "busybox",
|
|
@@ -553,7 +553,7 @@ func (s *DockerSuite) TestContainerApiCreateWithHostName(c *check.C) {
|
|
|
c.Assert(containerJSON.Config.Hostname, checker.Equals, hostName, check.Commentf("Mismatched Hostname"))
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCreateWithDomainName(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICreateWithDomainName(c *check.C) {
|
|
|
domainName := "test-domain"
|
|
|
config := map[string]interface{}{
|
|
|
"Image": "busybox",
|
|
@@ -576,13 +576,13 @@ func (s *DockerSuite) TestContainerApiCreateWithDomainName(c *check.C) {
|
|
|
c.Assert(containerJSON.Config.Domainname, checker.Equals, domainName, check.Commentf("Mismatched Domainname"))
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCreateBridgeNetworkMode(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICreateBridgeNetworkMode(c *check.C) {
|
|
|
// Windows does not support bridge
|
|
|
testRequires(c, DaemonIsLinux)
|
|
|
UtilCreateNetworkMode(c, "bridge")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCreateOtherNetworkModes(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICreateOtherNetworkModes(c *check.C) {
|
|
|
// Windows does not support these network modes
|
|
|
testRequires(c, DaemonIsLinux, NotUserNamespace)
|
|
|
UtilCreateNetworkMode(c, "host")
|
|
@@ -611,7 +611,7 @@ func UtilCreateNetworkMode(c *check.C, networkMode string) {
|
|
|
c.Assert(containerJSON.HostConfig.NetworkMode, checker.Equals, containertypes.NetworkMode(networkMode), check.Commentf("Mismatched NetworkMode"))
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCreateWithCpuSharesCpuset(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICreateWithCpuSharesCpuset(c *check.C) {
|
|
|
// TODO Windows to Windows CI. The CpuShares part could be ported.
|
|
|
testRequires(c, DaemonIsLinux)
|
|
|
config := map[string]interface{}{
|
|
@@ -642,7 +642,7 @@ func (s *DockerSuite) TestContainerApiCreateWithCpuSharesCpuset(c *check.C) {
|
|
|
c.Assert(outCpuset, checker.Equals, "0")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiVerifyHeader(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIVerifyHeader(c *check.C) {
|
|
|
config := map[string]interface{}{
|
|
|
"Image": "busybox",
|
|
|
}
|
|
@@ -673,7 +673,7 @@ func (s *DockerSuite) TestContainerApiVerifyHeader(c *check.C) {
|
|
|
}
|
|
|
|
|
|
//Issue 14230. daemon should return 500 for invalid port syntax
|
|
|
-func (s *DockerSuite) TestContainerApiInvalidPortSyntax(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIInvalidPortSyntax(c *check.C) {
|
|
|
config := `{
|
|
|
"Image": "busybox",
|
|
|
"HostConfig": {
|
|
@@ -695,7 +695,7 @@ func (s *DockerSuite) TestContainerApiInvalidPortSyntax(c *check.C) {
|
|
|
c.Assert(string(b[:]), checker.Contains, "invalid port")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiInvalidRestartPolicyName(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIInvalidRestartPolicyName(c *check.C) {
|
|
|
config := `{
|
|
|
"Image": "busybox",
|
|
|
"HostConfig": {
|
|
@@ -715,7 +715,7 @@ func (s *DockerSuite) TestContainerApiInvalidRestartPolicyName(c *check.C) {
|
|
|
c.Assert(string(b[:]), checker.Contains, "invalid restart policy")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiInvalidRestartPolicyRetryMismatch(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIInvalidRestartPolicyRetryMismatch(c *check.C) {
|
|
|
config := `{
|
|
|
"Image": "busybox",
|
|
|
"HostConfig": {
|
|
@@ -735,7 +735,7 @@ func (s *DockerSuite) TestContainerApiInvalidRestartPolicyRetryMismatch(c *check
|
|
|
c.Assert(string(b[:]), checker.Contains, "maximum restart count not valid with restart policy")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiInvalidRestartPolicyPositiveRetryCount(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIInvalidRestartPolicyPositiveRetryCount(c *check.C) {
|
|
|
config := `{
|
|
|
"Image": "busybox",
|
|
|
"HostConfig": {
|
|
@@ -757,7 +757,7 @@ func (s *DockerSuite) TestContainerApiInvalidRestartPolicyPositiveRetryCount(c *
|
|
|
|
|
|
// Issue 7941 - test to make sure a "null" in JSON is just ignored.
|
|
|
// W/o this fix a null in JSON would be parsed into a string var as "null"
|
|
|
-func (s *DockerSuite) TestContainerApiPostCreateNull(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIPostCreateNull(c *check.C) {
|
|
|
config := `{
|
|
|
"Hostname":"",
|
|
|
"Domainname":"",
|
|
@@ -821,11 +821,11 @@ func (s *DockerSuite) TestCreateWithTooLowMemoryLimit(c *check.C) {
|
|
|
c.Assert(string(b), checker.Contains, "Minimum memory limit allowed is 4MB")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiRename(c *check.C) {
|
|
|
- out, _ := dockerCmd(c, "run", "--name", "TestContainerApiRename", "-d", "busybox", "sh")
|
|
|
+func (s *DockerSuite) TestContainerAPIRename(c *check.C) {
|
|
|
+ out, _ := dockerCmd(c, "run", "--name", "TestContainerAPIRename", "-d", "busybox", "sh")
|
|
|
|
|
|
containerID := strings.TrimSpace(out)
|
|
|
- newName := "TestContainerApiRenameNew"
|
|
|
+ newName := "TestContainerAPIRenameNew"
|
|
|
statusCode, _, err := sockRequest("POST", "/containers/"+containerID+"/rename?name="+newName, nil)
|
|
|
c.Assert(err, checker.IsNil)
|
|
|
// 204 No Content is expected, not 200
|
|
@@ -835,7 +835,7 @@ func (s *DockerSuite) TestContainerApiRename(c *check.C) {
|
|
|
c.Assert(name, checker.Equals, "/"+newName, check.Commentf("Failed to rename container"))
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiKill(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIKill(c *check.C) {
|
|
|
name := "test-api-kill"
|
|
|
runSleepingContainer(c, "-i", "--name", name)
|
|
|
|
|
@@ -847,7 +847,7 @@ func (s *DockerSuite) TestContainerApiKill(c *check.C) {
|
|
|
c.Assert(state, checker.Equals, "false", check.Commentf("got wrong State from container %s: %q", name, state))
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiRestart(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIRestart(c *check.C) {
|
|
|
// TODO Windows to Windows CI. This is flaky due to the timing
|
|
|
testRequires(c, DaemonIsLinux)
|
|
|
name := "test-api-restart"
|
|
@@ -859,7 +859,7 @@ func (s *DockerSuite) TestContainerApiRestart(c *check.C) {
|
|
|
c.Assert(waitInspect(name, "{{ .State.Restarting }} {{ .State.Running }}", "false true", 5*time.Second), checker.IsNil)
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiRestartNotimeoutParam(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIRestartNotimeoutParam(c *check.C) {
|
|
|
// TODO Windows to Windows CI. This is flaky due to the timing
|
|
|
testRequires(c, DaemonIsLinux)
|
|
|
name := "test-api-restart-no-timeout-param"
|
|
@@ -873,7 +873,7 @@ func (s *DockerSuite) TestContainerApiRestartNotimeoutParam(c *check.C) {
|
|
|
c.Assert(waitInspect(name, "{{ .State.Restarting }} {{ .State.Running }}", "false true", 5*time.Second), checker.IsNil)
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiStart(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIStart(c *check.C) {
|
|
|
name := "testing-start"
|
|
|
config := map[string]interface{}{
|
|
|
"Image": "busybox",
|
|
@@ -899,7 +899,7 @@ func (s *DockerSuite) TestContainerApiStart(c *check.C) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiStop(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIStop(c *check.C) {
|
|
|
name := "test-api-stop"
|
|
|
runSleepingContainer(c, "-i", "--name", name)
|
|
|
|
|
@@ -914,7 +914,7 @@ func (s *DockerSuite) TestContainerApiStop(c *check.C) {
|
|
|
c.Assert(status, checker.Equals, http.StatusNotModified)
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiWait(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIWait(c *check.C) {
|
|
|
name := "test-api-wait"
|
|
|
|
|
|
sleepCmd := "/bin/sleep"
|
|
@@ -933,7 +933,7 @@ func (s *DockerSuite) TestContainerApiWait(c *check.C) {
|
|
|
c.Assert(waitres.StatusCode, checker.Equals, 0)
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCopyNotExistsAnyMore(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICopyNotExistsAnyMore(c *check.C) {
|
|
|
name := "test-container-api-copy"
|
|
|
dockerCmd(c, "run", "--name", name, "busybox", "touch", "/test.txt")
|
|
|
|
|
@@ -946,7 +946,7 @@ func (s *DockerSuite) TestContainerApiCopyNotExistsAnyMore(c *check.C) {
|
|
|
c.Assert(status, checker.Equals, http.StatusNotFound)
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCopyPre124(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICopyPre124(c *check.C) {
|
|
|
|
|
|
name := "test-container-api-copy"
|
|
|
dockerCmd(c, "run", "--name", name, "busybox", "touch", "/test.txt")
|
|
@@ -976,7 +976,7 @@ func (s *DockerSuite) TestContainerApiCopyPre124(c *check.C) {
|
|
|
c.Assert(found, checker.True)
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCopyResourcePathEmptyPr124(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICopyResourcePathEmptyPr124(c *check.C) {
|
|
|
name := "test-container-api-copy-resource-empty"
|
|
|
dockerCmd(c, "run", "--name", name, "busybox", "touch", "/test.txt")
|
|
|
|
|
@@ -990,7 +990,7 @@ func (s *DockerSuite) TestContainerApiCopyResourcePathEmptyPr124(c *check.C) {
|
|
|
c.Assert(string(body), checker.Matches, "Path cannot be empty\n")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCopyResourcePathNotFoundPre124(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICopyResourcePathNotFoundPre124(c *check.C) {
|
|
|
name := "test-container-api-copy-resource-not-found"
|
|
|
dockerCmd(c, "run", "--name", name, "busybox")
|
|
|
|
|
@@ -1004,7 +1004,7 @@ func (s *DockerSuite) TestContainerApiCopyResourcePathNotFoundPre124(c *check.C)
|
|
|
c.Assert(string(body), checker.Matches, "Could not find the file /notexist in container "+name+"\n")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCopyContainerNotFoundPr124(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICopyContainerNotFoundPr124(c *check.C) {
|
|
|
postData := types.CopyConfig{
|
|
|
Resource: "/something",
|
|
|
}
|
|
@@ -1014,7 +1014,7 @@ func (s *DockerSuite) TestContainerApiCopyContainerNotFoundPr124(c *check.C) {
|
|
|
c.Assert(status, checker.Equals, http.StatusNotFound)
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiDelete(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIDelete(c *check.C) {
|
|
|
out, _ := runSleepingContainer(c)
|
|
|
|
|
|
id := strings.TrimSpace(out)
|
|
@@ -1027,14 +1027,14 @@ func (s *DockerSuite) TestContainerApiDelete(c *check.C) {
|
|
|
c.Assert(status, checker.Equals, http.StatusNoContent)
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiDeleteNotExist(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIDeleteNotExist(c *check.C) {
|
|
|
status, body, err := sockRequest("DELETE", "/containers/doesnotexist", nil)
|
|
|
c.Assert(err, checker.IsNil)
|
|
|
c.Assert(status, checker.Equals, http.StatusNotFound)
|
|
|
c.Assert(getErrorMessage(c, body), checker.Matches, "No such container: doesnotexist")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiDeleteForce(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIDeleteForce(c *check.C) {
|
|
|
out, _ := runSleepingContainer(c)
|
|
|
|
|
|
id := strings.TrimSpace(out)
|
|
@@ -1045,7 +1045,7 @@ func (s *DockerSuite) TestContainerApiDeleteForce(c *check.C) {
|
|
|
c.Assert(status, checker.Equals, http.StatusNoContent)
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiDeleteRemoveLinks(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIDeleteRemoveLinks(c *check.C) {
|
|
|
// Windows does not support links
|
|
|
testRequires(c, DaemonIsLinux)
|
|
|
out, _ := dockerCmd(c, "run", "-d", "--name", "tlink1", "busybox", "top")
|
|
@@ -1069,7 +1069,7 @@ func (s *DockerSuite) TestContainerApiDeleteRemoveLinks(c *check.C) {
|
|
|
c.Assert(linksPostRm, checker.Equals, "null", check.Commentf("call to api deleteContainer links should have removed the specified links"))
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiDeleteConflict(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIDeleteConflict(c *check.C) {
|
|
|
out, _ := runSleepingContainer(c)
|
|
|
|
|
|
id := strings.TrimSpace(out)
|
|
@@ -1080,7 +1080,7 @@ func (s *DockerSuite) TestContainerApiDeleteConflict(c *check.C) {
|
|
|
c.Assert(status, checker.Equals, http.StatusConflict)
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiDeleteRemoveVolume(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIDeleteRemoveVolume(c *check.C) {
|
|
|
testRequires(c, SameHostDaemon)
|
|
|
|
|
|
vol := "/testvolume"
|
|
@@ -1105,7 +1105,7 @@ func (s *DockerSuite) TestContainerApiDeleteRemoveVolume(c *check.C) {
|
|
|
}
|
|
|
|
|
|
// Regression test for https://github.com/docker/docker/issues/6231
|
|
|
-func (s *DockerSuite) TestContainerApiChunkedEncoding(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIChunkedEncoding(c *check.C) {
|
|
|
conn, err := sockConn(time.Duration(10*time.Second), "")
|
|
|
c.Assert(err, checker.IsNil)
|
|
|
client := httputil.NewClientConn(conn, nil)
|
|
@@ -1133,7 +1133,7 @@ func (s *DockerSuite) TestContainerApiChunkedEncoding(c *check.C) {
|
|
|
c.Assert(resp.StatusCode, checker.Equals, http.StatusCreated)
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiPostContainerStop(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIPostContainerStop(c *check.C) {
|
|
|
out, _ := runSleepingContainer(c)
|
|
|
|
|
|
containerID := strings.TrimSpace(out)
|
|
@@ -1147,7 +1147,7 @@ func (s *DockerSuite) TestContainerApiPostContainerStop(c *check.C) {
|
|
|
}
|
|
|
|
|
|
// #14170
|
|
|
-func (s *DockerSuite) TestPostContainerApiCreateWithStringOrSliceEntrypoint(c *check.C) {
|
|
|
+func (s *DockerSuite) TestPostContainerAPICreateWithStringOrSliceEntrypoint(c *check.C) {
|
|
|
config := struct {
|
|
|
Image string
|
|
|
Entrypoint string
|
|
@@ -1215,7 +1215,7 @@ func (s *DockerSuite) TestPostContainersCreateWithStringOrSliceCapAddDrop(c *che
|
|
|
}
|
|
|
|
|
|
// #14915
|
|
|
-func (s *DockerSuite) TestContainerApiCreateNoHostConfig118(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICreateNoHostConfig118(c *check.C) {
|
|
|
config := struct {
|
|
|
Image string
|
|
|
}{"busybox"}
|
|
@@ -1259,7 +1259,7 @@ func (s *DockerSuite) TestPutContainerArchiveErrSymlinkInVolumeToReadOnlyRootfs(
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiGetContainersJSONEmpty(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIGetContainersJSONEmpty(c *check.C) {
|
|
|
status, body, err := sockRequest("GET", "/containers/json?all=1", nil)
|
|
|
c.Assert(err, checker.IsNil)
|
|
|
c.Assert(status, checker.Equals, http.StatusOK)
|
|
@@ -1463,14 +1463,14 @@ func (s *DockerSuite) TestPostContainersCreateWithOomScoreAdjInvalidRange(c *che
|
|
|
}
|
|
|
|
|
|
// test case for #22210 where an empty container name caused panic.
|
|
|
-func (s *DockerSuite) TestContainerApiDeleteWithEmptyName(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIDeleteWithEmptyName(c *check.C) {
|
|
|
status, out, err := sockRequest("DELETE", "/containers/", nil)
|
|
|
c.Assert(err, checker.IsNil)
|
|
|
c.Assert(status, checker.Equals, http.StatusBadRequest)
|
|
|
c.Assert(string(out), checker.Contains, "No container name or ID supplied")
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiStatsWithNetworkDisabled(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPIStatsWithNetworkDisabled(c *check.C) {
|
|
|
// Problematic on Windows as Windows does not support stats
|
|
|
testRequires(c, DaemonIsLinux)
|
|
|
|
|
@@ -1522,7 +1522,7 @@ func (s *DockerSuite) TestContainerApiStatsWithNetworkDisabled(c *check.C) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainersApiCreateMountsValidation(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainersAPICreateMountsValidation(c *check.C) {
|
|
|
type m mounttypes.Mount
|
|
|
type hc struct{ Mounts []m }
|
|
|
type cfg struct {
|
|
@@ -1577,7 +1577,7 @@ func (s *DockerSuite) TestContainersApiCreateMountsValidation(c *check.C) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func (s *DockerSuite) TestContainerApiCreateMountsBindRead(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainerAPICreateMountsBindRead(c *check.C) {
|
|
|
testRequires(c, NotUserNamespace, SameHostDaemon)
|
|
|
// also with data in the host side
|
|
|
prefix, slash := getPrefixAndSlashFromDaemonPlatform()
|
|
@@ -1602,7 +1602,7 @@ func (s *DockerSuite) TestContainerApiCreateMountsBindRead(c *check.C) {
|
|
|
}
|
|
|
|
|
|
// Test Mounts comes out as expected for the MountPoint
|
|
|
-func (s *DockerSuite) TestContainersApiCreateMountsCreate(c *check.C) {
|
|
|
+func (s *DockerSuite) TestContainersAPICreateMountsCreate(c *check.C) {
|
|
|
prefix, slash := getPrefixAndSlashFromDaemonPlatform()
|
|
|
destPath := prefix + slash + "foo"
|
|
|
|