summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-09-06 13:53:35 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-09-06 13:56:26 +0200
commitd22aeeec28843e1d8a5834bffb63e0d82267e4ba (patch)
tree0056bb291e2111d77afaef6d7c6a50924dae7197 /test
parent098c0714e5c2c461c175753eef3dc9d900699be5 (diff)
downloadpodman-d22aeeec28843e1d8a5834bffb63e0d82267e4ba.tar.gz
podman-d22aeeec28843e1d8a5834bffb63e0d82267e4ba.tar.bz2
podman-d22aeeec28843e1d8a5834bffb63e0d82267e4ba.zip
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 <pholzing@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/events_test.go7
1 files changed, 7 insertions, 0 deletions
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() {