From da559869661b70e507e526435652ec54cc00d2f3 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 6 Sep 2022 13:53:35 +0200 Subject: fix podman events with custom format podman events --format {{.ID}} was not working since the template was converted to a range but we only render each event individually. Signed-off-by: Paul Holzinger --- test/e2e/events_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/e2e/events_test.go b/test/e2e/events_test.go index 528fa143d..7de2c2b31 100644 --- a/test/e2e/events_test.go +++ b/test/e2e/events_test.go @@ -153,6 +153,13 @@ var _ = Describe("Podman events", func() { event = events.Event{} err = json.Unmarshal([]byte(jsonArr[0]), &event) Expect(err).ToNot(HaveOccurred()) + + test = podmanTest.Podman([]string{"events", "--stream=false", "--filter=type=container", "--format", "ID: {{.ID}}"}) + test.WaitWithDefaultTimeout() + Expect(test).To(Exit(0)) + arr := test.OutputToStringArray() + Expect(len(arr)).To(BeNumerically(">", 1)) + Expect(arr[0]).To(MatchRegexp("ID: [a-fA-F0-9]{64}")) }) It("podman events --until future", func() { -- cgit v1.2.3-54-g00ecf