diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-07 13:29:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-07 13:29:04 -0400 |
commit | 173e3c2faa74e5ef1b941338c06e5dd7dca68ac2 (patch) | |
tree | ace2821ff5c5ef5044d5a8b796f39bcd53a8e3d0 /test/e2e | |
parent | ce93ab354234c989c52bdbf87166e117e7c97fce (diff) | |
parent | 3ae47f7d2b9328ff47dc5702d834ae9ee296a27b (diff) | |
download | podman-173e3c2faa74e5ef1b941338c06e5dd7dca68ac2.tar.gz podman-173e3c2faa74e5ef1b941338c06e5dd7dca68ac2.tar.bz2 podman-173e3c2faa74e5ef1b941338c06e5dd7dca68ac2.zip |
Merge pull request #7937 from rhatdan/size
Populate /etc/hosts file when run in a user namespace
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/run_networking_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go index 044e56e6c..0f8b3e939 100644 --- a/test/e2e/run_networking_test.go +++ b/test/e2e/run_networking_test.go @@ -477,6 +477,17 @@ var _ = Describe("Podman run networking", func() { Expect(session.ExitCode()).To(Equal(0)) }) + It("podman run --uidmap /etc/hosts contains --hostname", func() { + SkipIfRootless("uidmap population of cninetworks not supported for rootless users") + session := podmanTest.Podman([]string{"run", "--uidmap", "0:100000:1000", "--rm", "--hostname", "foohostname", ALPINE, "grep", "foohostname", "/etc/hosts"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.Podman([]string{"run", "--uidmap", "0:100000:1000", "--rm", "--hostname", "foohostname", "-v", "/etc/hosts:/etc/hosts", ALPINE, "grep", "foohostname", "/etc/hosts"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(1)) + }) + It("podman run network in user created network namespace", func() { SkipIfRootless("ip netns is not supported for rootless users") if Containerized() { |