summaryrefslogtreecommitdiff
path: root/test/e2e/events_test.go
diff options
context:
space:
mode:
authorcdoern <cdoern@redhat.com>2021-08-09 10:07:46 -0400
committercdoern <cdoern@redhat.com>2021-08-23 12:51:56 -0400
commitd06d285e66251784126b4f19e047c2a93182d08e (patch)
tree1a1078cc0bca1f2c9fb864dd268c4644e381b8a7 /test/e2e/events_test.go
parent04ab2b16617fe2d3178eb0b461aacbcab609611e (diff)
downloadpodman-d06d285e66251784126b4f19e047c2a93182d08e.tar.gz
podman-d06d285e66251784126b4f19e047c2a93182d08e.tar.bz2
podman-d06d285e66251784126b4f19e047c2a93182d08e.zip
logFile until flag issue
we were adding a negative duration in podman events, causing inputs like -5s to be correct and 5s to be incorrect. fixes #11158 Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'test/e2e/events_test.go')
-rw-r--r--test/e2e/events_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/e2e/events_test.go b/test/e2e/events_test.go
index e2a169383..46ea10c56 100644
--- a/test/e2e/events_test.go
+++ b/test/e2e/events_test.go
@@ -184,6 +184,19 @@ var _ = Describe("Podman events", func() {
Expect(result.OutputToString()).To(ContainSubstring(name2))
Expect(result.OutputToString()).To(ContainSubstring(name3))
+ // string duration in 10 seconds
+ untilT := time.Now().Add(time.Second * 9)
+ result = podmanTest.Podman([]string{"events", "--since", "30s", "--until", "10s"})
+ result.Wait(11)
+ Expect(result).Should(Exit(0))
+ tEnd := time.Now()
+ outDur := tEnd.Sub(untilT)
+ diff := outDur.Seconds() > 0
+ Expect(diff).To(Equal(true))
+ Expect(result.OutputToString()).To(ContainSubstring(name1))
+ Expect(result.OutputToString()).To(ContainSubstring(name2))
+ Expect(result.OutputToString()).To(ContainSubstring(name3))
+
wg.Wait()
})
})