summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-07 23:38:23 +0200
committerGitHub <noreply@github.com>2019-08-07 23:38:23 +0200
commit35ecf498dc1fb20a56af615d9324d1707cc56fb9 (patch)
tree91e55ef5db20f9989f6565c577fd58566854bae8 /test/e2e
parent66ea32cbaf926d59fae3345b7e27a15050ab3afe (diff)
parentdc750df8024ad3782a09ccc8d60ac82d5bb9eaca (diff)
downloadpodman-35ecf498dc1fb20a56af615d9324d1707cc56fb9.tar.gz
podman-35ecf498dc1fb20a56af615d9324d1707cc56fb9.tar.bz2
podman-35ecf498dc1fb20a56af615d9324d1707cc56fb9.zip
Merge pull request #3741 from haircommander/uts-fix
Properly share UTS namespaces in a pod
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/pod_infra_container_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/e2e/pod_infra_container_test.go b/test/e2e/pod_infra_container_test.go
index c8763de9f..3897aa851 100644
--- a/test/e2e/pod_infra_container_test.go
+++ b/test/e2e/pod_infra_container_test.go
@@ -383,4 +383,24 @@ var _ = Describe("Podman pod create", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
})
+
+ It("podman run hostname is shared", func() {
+ session := podmanTest.Podman([]string{"pod", "create"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ podID := session.OutputToString()
+
+ // verify we can add a host to the infra's /etc/hosts
+ session = podmanTest.Podman([]string{"run", "--pod", podID, ALPINE, "hostname"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ hostname := session.OutputToString()
+
+ infraName := podID[:12] + "-infra"
+ // verify we can see the other hosts of infra's /etc/hosts
+ session = podmanTest.Podman([]string{"inspect", infraName})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring(hostname))
+ })
})