summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-21 12:23:49 +0200
committerGitHub <noreply@github.com>2020-06-21 12:23:49 +0200
commit0e4b73456d4c545136a5cfd664b6d9d819ffc498 (patch)
tree978cd016fec36dc7fdd01dad57df46070ffcc9b6 /test/e2e
parent4a1dd9f9a416a7098a707436e1285eaa5cfc1722 (diff)
parent5b3503c0a1bf93dc327145e8952ed5b05932dee5 (diff)
downloadpodman-0e4b73456d4c545136a5cfd664b6d9d819ffc498.tar.gz
podman-0e4b73456d4c545136a5cfd664b6d9d819ffc498.tar.bz2
podman-0e4b73456d4c545136a5cfd664b6d9d819ffc498.zip
Merge pull request #6683 from rhatdan/hostname
Add container name to the /etc/hosts within the container
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/run_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index c78c23b1f..7e75e2605 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -101,6 +101,18 @@ var _ = Describe("Podman run", func() {
Expect(match).Should(BeTrue())
})
+ It("podman create pod with name in /etc/hosts", func() {
+ name := "test_container"
+ hostname := "test_hostname"
+ session := podmanTest.Podman([]string{"run", "-ti", "--rm", "--name", name, "--hostname", hostname, ALPINE, "cat", "/etc/hosts"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ match, _ := session.GrepString(name)
+ Expect(match).Should(BeTrue())
+ match, _ = session.GrepString(hostname)
+ Expect(match).Should(BeTrue())
+ })
+
It("podman run a container based on remote image", func() {
session := podmanTest.Podman([]string{"run", "-dt", BB_GLIBC, "ls"})
session.WaitWithDefaultTimeout()