summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-06-22 14:26:03 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-06-24 10:12:33 +0200
commitbd5e113b713347954b8113552019a24ccff68eef (patch)
tree78cb92d36e8b8b6d7511b686f18feefbaf71596a /test
parent5787f88042a891b877d6974d7ab9eb0b9889bd2d (diff)
downloadpodman-bd5e113b713347954b8113552019a24ccff68eef.tar.gz
podman-bd5e113b713347954b8113552019a24ccff68eef.tar.bz2
podman-bd5e113b713347954b8113552019a24ccff68eef.zip
rootless: add an entry to /etc/hosts when using slirp4netns
Closes: https://github.com/containers/libpod/issues/3405 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/run_networking_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/e2e/run_networking_test.go b/test/e2e/run_networking_test.go
index 1497a651b..31291d373 100644
--- a/test/e2e/run_networking_test.go
+++ b/test/e2e/run_networking_test.go
@@ -178,6 +178,12 @@ var _ = Describe("Podman run networking", func() {
Expect(exec4.OutputToString()).To(ContainSubstring("192.0.2.2 test1"))
})
+ It("podman run /etc/hosts contains --hostname", func() {
+ session := podmanTest.Podman([]string{"run", "--rm", "--hostname", "foohostname", ALPINE, "grep", "foohostname", "/etc/hosts"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
It("podman run network in user created network namespace", func() {
SkipIfRootless()
if Containerized() {