Skip to content

Commit df69a8b

Browse files
author
OpenShift Bot
authored
Merge pull request #9304 from smarterclayton/check_logs_after
Merged by openshift-bot
2 parents c02ce07 + 960bc64 commit df69a8b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/extended/deployments/deployments.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,15 @@ var _ = g.Describe("deploymentconfigs", func() {
175175

176176
out, err = oc.Run("logs").Args("-f", "dc/deployment-test").Output()
177177
o.Expect(err).NotTo(o.HaveOccurred())
178+
179+
g.By("verifying the deployment is marked complete and scaled to zero")
180+
o.Expect(waitForLatestCondition(oc, "deployment-test", deploymentRunTimeout, deploymentReachedCompletion)).NotTo(o.HaveOccurred())
181+
178182
g.By(fmt.Sprintf("checking the logs for substrings\n%s", out))
179183
o.Expect(out).To(o.ContainSubstring(fmt.Sprintf("deployment-test-%d up to 1", i+2)))
180184
o.Expect(out).To(o.ContainSubstring("--> pre: Success"))
181185
o.Expect(out).To(o.ContainSubstring("test pre hook executed"))
182186
o.Expect(out).To(o.ContainSubstring("--> Success"))
183-
184-
g.By("verifying the deployment is marked complete and scaled to zero")
185-
o.Expect(waitForLatestCondition(oc, "deployment-test", deploymentRunTimeout, deploymentReachedCompletion)).NotTo(o.HaveOccurred())
186187
}
187188
})
188189
})
@@ -196,6 +197,10 @@ var _ = g.Describe("deploymentconfigs", func() {
196197

197198
out, err = oc.Run("logs").Args("-f", "dc/custom-deployment").Output()
198199
o.Expect(err).NotTo(o.HaveOccurred())
200+
201+
g.By("verifying the deployment is marked complete")
202+
o.Expect(waitForLatestCondition(oc, "custom-deployment", deploymentRunTimeout, deploymentReachedCompletion)).NotTo(o.HaveOccurred())
203+
199204
g.By(fmt.Sprintf("checking the logs for substrings\n%s", out))
200205
o.Expect(out).To(o.ContainSubstring("--> pre: Running hook pod ..."))
201206
o.Expect(out).To(o.ContainSubstring("test pre hook executed"))
@@ -204,9 +209,6 @@ var _ = g.Describe("deploymentconfigs", func() {
204209
o.Expect(out).To(o.ContainSubstring("Halfway"))
205210
o.Expect(out).To(o.ContainSubstring("Finished"))
206211
o.Expect(out).To(o.ContainSubstring("--> Success"))
207-
208-
g.By("verifying the deployment is marked complete")
209-
o.Expect(waitForLatestCondition(oc, "custom-deployment", deploymentRunTimeout, deploymentReachedCompletion)).NotTo(o.HaveOccurred())
210212
})
211213
})
212214

0 commit comments

Comments
 (0)