mirror of
https://github.com/moby/moby.git
synced 2025-07-30 18:23:29 +03:00
Add (hidden) flags to set containerd namespaces
This allows our tests, which all share a containerd instance, to be a bit more isolated by setting the containerd namespaces to the generated daemon ID's rather than the default namespaces. This came about because I found in some cases we had test daemons failing to start (really very slow to start) because it was (seemingly) processing events from other tests. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
@ -25,7 +25,6 @@ import (
|
||||
|
||||
"github.com/cloudflare/cfssl/helpers"
|
||||
"github.com/docker/docker/api/types"
|
||||
moby_daemon "github.com/docker/docker/daemon"
|
||||
"github.com/docker/docker/integration-cli/checker"
|
||||
"github.com/docker/docker/integration-cli/cli"
|
||||
"github.com/docker/docker/integration-cli/cli/build"
|
||||
@ -1457,7 +1456,7 @@ func (s *DockerDaemonSuite) TestCleanupMountsAfterDaemonAndContainerKill(c *chec
|
||||
|
||||
// kill the container
|
||||
icmd.RunCommand(ctrBinary, "--address", containerdSocket,
|
||||
"--namespace", moby_daemon.ContainersNamespace, "tasks", "kill", id).Assert(c, icmd.Success)
|
||||
"--namespace", d.ContainersNamespace(), "tasks", "kill", id).Assert(c, icmd.Success)
|
||||
|
||||
// restart daemon.
|
||||
d.Restart(c)
|
||||
@ -1977,7 +1976,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithKilledRunningContainer(t *check
|
||||
|
||||
// kill the container
|
||||
icmd.RunCommand(ctrBinary, "--address", containerdSocket,
|
||||
"--namespace", moby_daemon.ContainersNamespace, "tasks", "kill", cid).Assert(t, icmd.Success)
|
||||
"--namespace", s.d.ContainersNamespace(), "tasks", "kill", cid).Assert(t, icmd.Success)
|
||||
|
||||
// Give time to containerd to process the command if we don't
|
||||
// the exit event might be received after we do the inspect
|
||||
@ -2080,7 +2079,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithUnpausedRunningContainer(t *che
|
||||
result := icmd.RunCommand(
|
||||
ctrBinary,
|
||||
"--address", containerdSocket,
|
||||
"--namespace", moby_daemon.ContainersNamespace,
|
||||
"--namespace", s.d.ContainersNamespace(),
|
||||
"tasks", "resume", cid)
|
||||
result.Assert(t, icmd.Success)
|
||||
|
||||
|
Reference in New Issue
Block a user