Skip to content

Commit

Permalink
Simplify if condition in cronjob tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugoy committed Jan 30, 2024
1 parent ba4754d commit b5dd0e0
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,7 @@ var _ = Describe("CronJob controller", func() {
// We'll need to retry getting this newly created CronJob, given that creation may not immediately happen.
Eventually(func() bool {
err := k8sClient.Get(ctx, cronjobLookupKey, createdCronjob)
if err != nil {
return false
}
return true
return err == nil
}, timeout, interval).Should(BeTrue())
// Let's make sure our Schedule string value was properly converted/handled.
Expect(createdCronjob.Spec.Schedule).Should(Equal("1 * * * *"))
Expand Down

0 comments on commit b5dd0e0

Please sign in to comment.