summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-08-26 10:12:09 -0400
committerGitHub <noreply@github.com>2021-08-26 10:12:09 -0400
commit54e0afffe7dd8e5ab7daa75de2f06331cd78dd48 (patch)
tree9eda4d0f39327c2e777aa1faa600968c7963ab9e /test
parentcb235592702550c94bdc526a033ca2cebecb7337 (diff)
parentd06d285e66251784126b4f19e047c2a93182d08e (diff)
downloadpodman-54e0afffe7dd8e5ab7daa75de2f06331cd78dd48.tar.gz
podman-54e0afffe7dd8e5ab7daa75de2f06331cd78dd48.tar.bz2
podman-54e0afffe7dd8e5ab7daa75de2f06331cd78dd48.zip
Merge pull request #11218 from cdoern/untilBug
logFile until flag issue, negative duration replaced with positive
Diffstat (limited to 'test')
-rw-r--r--test/e2e/events_test.go13
-rw-r--r--test/e2e/logs_test.go2
2 files changed, 14 insertions, 1 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()
})
})
diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go
index 0a973b802..71d30f063 100644
--- a/test/e2e/logs_test.go
+++ b/test/e2e/logs_test.go
@@ -145,7 +145,7 @@ var _ = Describe("Podman logs", func() {
results := podmanTest.Podman([]string{"logs", "--until", "10m", cid})
results.WaitWithDefaultTimeout()
Expect(results).To(Exit(0))
- Expect(len(results.OutputToStringArray())).To(Equal(0))
+ Expect(len(results.OutputToStringArray())).To(Equal(3))
})
It("until time NOW: "+log, func() {