diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-07-21 19:45:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-21 19:45:56 +0200 |
commit | 5f53a67742d6151fee3f62f4d82226da6246b461 (patch) | |
tree | e179ad19e4376c8712bcf8e49e4e649d6fb8cbc0 /test | |
parent | 04ed519e9d38e2ae12ec0b568e6418e750ff203d (diff) | |
parent | dd2b794061aa6734edc15eb69cc298ea197ae676 (diff) | |
download | podman-5f53a67742d6151fee3f62f4d82226da6246b461.tar.gz podman-5f53a67742d6151fee3f62f4d82226da6246b461.tar.bz2 podman-5f53a67742d6151fee3f62f4d82226da6246b461.zip |
Merge pull request #15003 from giuseppe/create-etc-passwd
libpod: create /etc/passwd if missing
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/run_passwd_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/e2e/run_passwd_test.go b/test/e2e/run_passwd_test.go index 411e12218..20a6ee3b1 100644 --- a/test/e2e/run_passwd_test.go +++ b/test/e2e/run_passwd_test.go @@ -66,10 +66,15 @@ RUN rm -f /etc/passwd /etc/shadow /etc/group USER 1000`, ALPINE) imgName := "testimg" podmanTest.BuildImage(dockerfile, imgName, "false") - session := podmanTest.Podman([]string{"run", "--rm", imgName, "ls", "/etc/"}) + session := podmanTest.Podman([]string{"run", "--passwd=false", "--rm", imgName, "ls", "/etc/"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) Expect(session.OutputToString()).To(Not(ContainSubstring("passwd"))) + + // test that the /etc/passwd file is created + session = podmanTest.Podman([]string{"run", "--rm", "--user", "0:0", imgName, "ls", "/etc/passwd"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) }) It("podman run with no user specified does not change --group specified", func() { |