summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/e2e/pod_infra_container_test.go20
-rw-r--r--test/system/200-pod-top.bats5
2 files changed, 20 insertions, 5 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))
+ })
})
diff --git a/test/system/200-pod-top.bats b/test/system/200-pod-top.bats
index 08f495fb1..10808ddb2 100644
--- a/test/system/200-pod-top.bats
+++ b/test/system/200-pod-top.bats
@@ -3,8 +3,6 @@
load helpers
@test "podman pod top - containers in different PID namespaces" {
- skip "this test is not reliable. Reenable once pod-top is fixed."
-
# With infra=false, we don't get a /pause container (we also
# don't pull k8s.gcr.io/pause )
no_infra='--infra=false'
@@ -28,9 +26,6 @@ load helpers
# By default (podman pod create w/ default --infra) there should be
# a /pause container.
- # FIXME: sometimes there is, sometimes there isn't. If anyone ever
- # actually figures this out, please either reenable this line or
- # remove it entirely.
if [ -z "$no_infra" ]; then
is "$output" ".*0 \+1 \+0 \+[0-9. ?s]\+/pause" "there is a /pause container"
fi