diff options
author | Leah Neukirchen <leah@vuxu.org> | 2021-12-17 14:56:32 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-01-12 13:25:17 +0100 |
commit | 5aedcb36435048dc06a18476aed2cfda1bf41031 (patch) | |
tree | 4f887ff05ca099501f4fc460b48b6de509f8cb80 /test/e2e | |
parent | 8365d49a05eccbaad4a796470c2cf62083249997 (diff) | |
download | podman-5aedcb36435048dc06a18476aed2cfda1bf41031.tar.gz podman-5aedcb36435048dc06a18476aed2cfda1bf41031.tar.bz2 podman-5aedcb36435048dc06a18476aed2cfda1bf41031.zip |
remote events: convert TimeNano properly
e.TimeNano contains nanoseconds since epoch, not just the nanoseconds
after e.Time.
time.Unix supports nanoseconds > 999999999 and converts them to seconds,
so just passing e.TimeNano is enough.
Signed-off-by: Leah Neukirchen <leah@vuxu.org>
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/events_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/e2e/events_test.go b/test/e2e/events_test.go index 39f495460..3b5b8ac6c 100644 --- a/test/e2e/events_test.go +++ b/test/e2e/events_test.go @@ -62,6 +62,8 @@ var _ = Describe("Podman events", func() { result.WaitWithDefaultTimeout() Expect(result).Should(Exit(0)) Expect(len(result.OutputToStringArray())).To(BeNumerically(">=", 1), "Number of events") + date := time.Now().Format("2006-01-02") + Expect(result.OutputToStringArray()).To(ContainElement(HavePrefix(date)), "event log has correct timestamp") }) It("podman events with an event filter and container=cid", func() { |