summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-09-23 20:39:56 +0200
committerGitHub <noreply@github.com>2022-09-23 20:39:56 +0200
commitf658bbd230ed9cf6fbdabf5ddab5cfcf8f224636 (patch)
treefe84092f24438dd3a5d713f4439c1919552aaf5c /test/e2e
parent25dc2759e10bf0293f14a2205291ab7dd53eccf4 (diff)
parent6ee582315bfba8db13541406f6def26ecd8f6aeb (diff)
downloadpodman-f658bbd230ed9cf6fbdabf5ddab5cfcf8f224636.tar.gz
podman-f658bbd230ed9cf6fbdabf5ddab5cfcf8f224636.tar.bz2
podman-f658bbd230ed9cf6fbdabf5ddab5cfcf8f224636.zip
Merge pull request #15463 from mheon/fix_15408
Events for containers in pods now include the pod's ID
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/events_test.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/e2e/events_test.go b/test/e2e/events_test.go
index bba42c3f4..c76919581 100644
--- a/test/e2e/events_test.go
+++ b/test/e2e/events_test.go
@@ -212,6 +212,16 @@ var _ = Describe("Podman events", func() {
Expect(result).Should(Exit(0))
Expect(result.OutputToStringArray()).To(HaveLen(1))
Expect(result.OutputToString()).To(ContainSubstring("create"))
+
+ ctrName := "testCtr"
+ run := podmanTest.Podman([]string{"create", "--pod", id, "--name", ctrName, ALPINE, "top"})
+ run.WaitWithDefaultTimeout()
+ Expect(run).Should(Exit(0))
+
+ result2 := podmanTest.Podman([]string{"events", "--stream=false", "--filter", fmt.Sprintf("container=%s", ctrName), "--since", "30s"})
+ result2.WaitWithDefaultTimeout()
+ Expect(result2).Should(Exit(0))
+ Expect(result2.OutputToString()).To(ContainSubstring(fmt.Sprintf("pod_id=%s", id)))
})
It("podman events health_status generated", func() {
@@ -229,7 +239,7 @@ var _ = Describe("Podman events", func() {
time.Sleep(1 * time.Second)
}
- result := podmanTest.Podman([]string{"events", "--stream=false", "--filter", "event=health_status"})
+ result := podmanTest.Podman([]string{"events", "--stream=false", "--filter", "event=health_status", "--since", "1m"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
Expect(len(result.OutputToStringArray())).To(BeNumerically(">=", 1), "Number of health_status events")