diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-03-05 14:28:30 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 14:28:30 -0800 |
commit | 40f78439459d0899de8643661b8e996a1e2460d6 (patch) | |
tree | d250a49bb2735739c73ee521855c064fa5c6effd /test | |
parent | 3d441b5d962308372e4eba85428ac479bc140199 (diff) | |
parent | 6c8f2072aaa3e0b46b2f8d94331fcc88ec6bff11 (diff) | |
download | podman-40f78439459d0899de8643661b8e996a1e2460d6.tar.gz podman-40f78439459d0899de8643661b8e996a1e2460d6.tar.bz2 podman-40f78439459d0899de8643661b8e996a1e2460d6.zip |
Merge pull request #2518 from haircommander/pod_host
Append hosts to dependency container's /etc/hosts file
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/pod_infra_container_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/pod_infra_container_test.go b/test/e2e/pod_infra_container_test.go index ed5002ca7..d9e5d380a 100644 --- a/test/e2e/pod_infra_container_test.go +++ b/test/e2e/pod_infra_container_test.go @@ -360,4 +360,21 @@ var _ = Describe("Podman pod create", func() { Expect(result.OutputToString()).To(ContainSubstring(infraID)) }) + + It("podman run --add-host in pod", 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, "--add-host", "foobar:127.0.0.1", BB, "ping", "-c", "1", "foobar"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + // verify we can see the other hosts of infra's /etc/hosts + session = podmanTest.Podman([]string{"run", "--pod", podID, BB, "ping", "-c", "1", "foobar"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + }) }) |