|
@@ -44,6 +44,8 @@ import (
|
|
"gotest.tools/icmd"
|
|
"gotest.tools/icmd"
|
|
)
|
|
)
|
|
|
|
|
|
|
|
+const containerdSocket = "/run/containerd/containerd.sock" // "/var/run/docker/containerd/docker-containerd.sock"
|
|
|
|
+
|
|
// TestLegacyDaemonCommand test starting docker daemon using "deprecated" docker daemon
|
|
// TestLegacyDaemonCommand test starting docker daemon using "deprecated" docker daemon
|
|
// command. Remove this test when we remove this.
|
|
// command. Remove this test when we remove this.
|
|
func (s *DockerDaemonSuite) TestLegacyDaemonCommand(c *check.C) {
|
|
func (s *DockerDaemonSuite) TestLegacyDaemonCommand(c *check.C) {
|
|
@@ -1449,7 +1451,7 @@ func (s *DockerDaemonSuite) TestCleanupMountsAfterDaemonAndContainerKill(c *chec
|
|
c.Assert(d.Kill(), check.IsNil)
|
|
c.Assert(d.Kill(), check.IsNil)
|
|
|
|
|
|
// kill the container
|
|
// kill the container
|
|
- icmd.RunCommand(ctrBinary, "--address", "/var/run/docker/containerd/docker-containerd.sock",
|
|
|
|
|
|
+ icmd.RunCommand(ctrBinary, "--address", containerdSocket,
|
|
"--namespace", moby_daemon.ContainersNamespace, "tasks", "kill", id).Assert(c, icmd.Success)
|
|
"--namespace", moby_daemon.ContainersNamespace, "tasks", "kill", id).Assert(c, icmd.Success)
|
|
|
|
|
|
// restart daemon.
|
|
// restart daemon.
|
|
@@ -1971,7 +1973,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithKilledRunningContainer(t *check
|
|
}
|
|
}
|
|
|
|
|
|
// kill the container
|
|
// kill the container
|
|
- icmd.RunCommand(ctrBinary, "--address", "/var/run/docker/containerd/docker-containerd.sock",
|
|
|
|
|
|
+ icmd.RunCommand(ctrBinary, "--address", containerdSocket,
|
|
"--namespace", moby_daemon.ContainersNamespace, "tasks", "kill", cid).Assert(t, icmd.Success)
|
|
"--namespace", moby_daemon.ContainersNamespace, "tasks", "kill", cid).Assert(t, icmd.Success)
|
|
|
|
|
|
// Give time to containerd to process the command if we don't
|
|
// Give time to containerd to process the command if we don't
|
|
@@ -2074,7 +2076,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithUnpausedRunningContainer(t *che
|
|
// resume the container
|
|
// resume the container
|
|
result := icmd.RunCommand(
|
|
result := icmd.RunCommand(
|
|
ctrBinary,
|
|
ctrBinary,
|
|
- "--address", "/var/run/docker/containerd/docker-containerd.sock",
|
|
|
|
|
|
+ "--address", containerdSocket,
|
|
"--namespace", moby_daemon.ContainersNamespace,
|
|
"--namespace", moby_daemon.ContainersNamespace,
|
|
"tasks", "resume", cid)
|
|
"tasks", "resume", cid)
|
|
result.Assert(t, icmd.Success)
|
|
result.Assert(t, icmd.Success)
|