summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-24 12:53:11 +0200
committerGitHub <noreply@github.com>2019-06-24 12:53:11 +0200
commit33280d881e1bd838cf5e346e5c338a3dc992b345 (patch)
tree4634db17efde26eeee03b77396bf5043d43834ed /test
parentb611ac1c50184827fa0be04a8de800e09b802705 (diff)
parentbd5e113b713347954b8113552019a24ccff68eef (diff)
downloadpodman-33280d881e1bd838cf5e346e5c338a3dc992b345.tar.gz
podman-33280d881e1bd838cf5e346e5c338a3dc992b345.tar.bz2
podman-33280d881e1bd838cf5e346e5c338a3dc992b345.zip
Merge pull request #3406 from giuseppe/slirp-entry-to-hosts
rootless: add an entry to /etc/hosts when using slirp4netns
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() {