Skip to content

Commit

Permalink
📖 Simplify if condition in cronjob tutorial (kubernetes-sigs#3765)
Browse files Browse the repository at this point in the history
Simplify if condition in cronjob tutorial
  • Loading branch information
lpugoy authored and sarthaksarthak9 committed Feb 25, 2024
1 parent a2ff78f commit c9c1f88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 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
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,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 c9c1f88

Please sign in to comment.