mirror of
https://github.com/moby/moby.git
synced 2026-08-03 22:51:03 +00:00
Fix more signal handling issues in tests.
Found these by doing a `grep -R 'using the force'` on a full test run. There's still a few more which are running against the main test daemon, so it is difficult to find which test they belong to. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@ func (s *DockerDaemonSuite) TestDaemonUserNamespaceRootSetting(c *testing.T) {
|
||||
// writable by the remapped root UID/GID pair
|
||||
assert.NilError(c, os.Chown(tmpDir, uid, gid))
|
||||
|
||||
out, err := s.d.Cmd("run", "-d", "--name", "userns", "-v", tmpDir+":/goofy", "-v", tmpDirNotExists+":/donald", "busybox", "sh", "-c", "touch /goofy/testfile; top")
|
||||
out, err := s.d.Cmd("run", "-d", "--name", "userns", "-v", tmpDir+":/goofy", "-v", tmpDirNotExists+":/donald", "busybox", "sh", "-c", "touch /goofy/testfile; exec top")
|
||||
assert.NilError(c, err, "Output: %s", out)
|
||||
|
||||
user := s.findUser(c, "userns")
|
||||
@@ -79,7 +79,7 @@ func (s *DockerDaemonSuite) TestDaemonUserNamespaceRootSetting(c *testing.T) {
|
||||
assert.Equal(c, stat.GID(), uint32(gid), "Touched file not owned by remapped root GID")
|
||||
|
||||
// use host usernamespace
|
||||
out, err = s.d.Cmd("run", "-d", "--name", "userns_skip", "--userns", "host", "busybox", "sh", "-c", "touch /goofy/testfile; top")
|
||||
out, err = s.d.Cmd("run", "-d", "--name", "userns_skip", "--userns", "host", "busybox", "sh", "-c", "touch /goofy/testfile; exec top")
|
||||
assert.Assert(c, err == nil, "Output: %s", out)
|
||||
user = s.findUser(c, "userns_skip")
|
||||
// userns are skipped, user is root
|
||||
|
||||
Reference in New Issue
Block a user