Merge pull request #18074 from edsantiago/waitwait

e2e tests: fix racy flakes
This commit is contained in:
OpenShift Merge Robot
2023-04-07 05:50:22 -04:00
committed by GitHub
3 changed files with 44 additions and 2 deletions

View File

@@ -84,6 +84,10 @@ var _ = Describe("Podman logs", func() {
Expect(logc).To(Exit(0))
cid := logc.OutputToString()
wait := podmanTest.Podman([]string{"wait", cid})
wait.WaitWithDefaultTimeout()
Expect(wait).To(Exit(0))
results := podmanTest.Podman([]string{"logs", "--tail", "2", cid})
results.WaitWithDefaultTimeout()
Expect(results).To(Exit(0))
@@ -98,6 +102,10 @@ var _ = Describe("Podman logs", func() {
Expect(logc).To(Exit(0))
cid := logc.OutputToString()
wait := podmanTest.Podman([]string{"wait", cid})
wait.WaitWithDefaultTimeout()
Expect(wait).To(Exit(0))
results := podmanTest.Podman([]string{"logs", "--tail", "0", cid})
results.WaitWithDefaultTimeout()
Expect(results).To(Exit(0))
@@ -112,6 +120,10 @@ var _ = Describe("Podman logs", func() {
logc.WaitWithDefaultTimeout()
Expect(logc).To(Exit(0))
wait := podmanTest.Podman([]string{"wait", name})
wait.WaitWithDefaultTimeout()
Expect(wait).To(Exit(0))
results := podmanTest.Podman([]string{"logs", "--tail", "99", name})
results.WaitWithDefaultTimeout()
Expect(results).To(Exit(0))
@@ -146,6 +158,10 @@ var _ = Describe("Podman logs", func() {
Expect(logc).To(Exit(0))
cid := logc.OutputToString()
wait := podmanTest.Podman([]string{"wait", cid})
wait.WaitWithDefaultTimeout()
Expect(wait).To(Exit(0))
results := podmanTest.Podman([]string{"logs", "--tail", "2", "-t", cid})
results.WaitWithDefaultTimeout()
Expect(results).To(Exit(0))
@@ -160,6 +176,10 @@ var _ = Describe("Podman logs", func() {
Expect(logc).To(Exit(0))
cid := logc.OutputToString()
wait := podmanTest.Podman([]string{"wait", cid})
wait.WaitWithDefaultTimeout()
Expect(wait).To(Exit(0))
results := podmanTest.Podman([]string{"logs", "--since", "2017-08-07T10:10:09.056611202-04:00", cid})
results.WaitWithDefaultTimeout()
Expect(results).To(Exit(0))
@@ -174,6 +194,10 @@ var _ = Describe("Podman logs", func() {
Expect(logc).To(Exit(0))
cid := logc.OutputToString()
wait := podmanTest.Podman([]string{"wait", cid})
wait.WaitWithDefaultTimeout()
Expect(wait).To(Exit(0))
results := podmanTest.Podman([]string{"logs", "--since", "10m", cid})
results.WaitWithDefaultTimeout()
Expect(results).To(Exit(0))
@@ -188,6 +212,10 @@ var _ = Describe("Podman logs", func() {
Expect(logc).To(Exit(0))
cid := logc.OutputToString()
wait := podmanTest.Podman([]string{"wait", cid})
wait.WaitWithDefaultTimeout()
Expect(wait).To(Exit(0))
results := podmanTest.Podman([]string{"logs", "--until", "10m", cid})
results.WaitWithDefaultTimeout()
Expect(results).To(Exit(0))
@@ -202,6 +230,10 @@ var _ = Describe("Podman logs", func() {
Expect(logc).To(Exit(0))
cid := logc.OutputToString()
wait := podmanTest.Podman([]string{"wait", cid})
wait.WaitWithDefaultTimeout()
Expect(wait).To(Exit(0))
now := time.Now()
now = now.Add(time.Minute * 1)
nowS := now.Format(time.RFC3339)
@@ -233,6 +265,10 @@ var _ = Describe("Podman logs", func() {
Expect(log2).Should(Exit(0))
cid2 := log2.OutputToString()
wait := podmanTest.Podman([]string{"wait", cid1, cid2})
wait.WaitWithDefaultTimeout()
Expect(wait).To(Exit(0))
results := podmanTest.Podman([]string{"logs", cid1, cid2})
results.WaitWithDefaultTimeout()
Expect(results).Should(Exit(0))

View File

@@ -2021,6 +2021,11 @@ var _ = Describe("Podman play kube", func() {
kube.WaitWithDefaultTimeout()
Expect(kube).Should(Exit(0))
wait := podmanTest.Podman([]string{"wait", "test-symlink-test-symlink"})
wait.WaitWithDefaultTimeout()
Expect(wait).Should(Exit(0))
Expect(wait.OutputToString()).To(Equal("0"))
logs := podmanTest.Podman([]string{"pod", "logs", "-c", "test-symlink-test-symlink", "test-symlink"})
logs.WaitWithDefaultTimeout()
Expect(logs).Should(Exit(0))