mirror of
https://github.com/containers/podman.git
synced 2025-12-19 07:09:39 +08:00
Merge pull request #12664 from cdoern/noManagePasswd
Podman run --passwd
This commit is contained in:
@@ -125,4 +125,16 @@ USER 1000`, ALPINE)
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session.OutputToString()).To(Not(ContainSubstring("/etc/group")))
|
||||
})
|
||||
|
||||
It("podman run --no-manage-passwd flag", func() {
|
||||
run := podmanTest.Podman([]string{"run", "--user", "1234:1234", ALPINE, "cat", "/etc/passwd"})
|
||||
run.WaitWithDefaultTimeout()
|
||||
Expect(run).Should(Exit(0))
|
||||
Expect(run.OutputToString()).To(ContainSubstring("1234:1234"))
|
||||
|
||||
run = podmanTest.Podman([]string{"run", "--passwd=false", "--user", "1234:1234", ALPINE, "cat", "/etc/passwd"})
|
||||
run.WaitWithDefaultTimeout()
|
||||
Expect(run).Should(Exit(0))
|
||||
Expect(run.OutputToString()).NotTo((ContainSubstring("1234:1234")))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user