You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaced some bespoke Eventually() signatures (e.g. func() bool and
func() (int, error)) with the standard func(g Gomega), allowing gomega
assertions to happen inside the Eventually().
Generally you _expect_ something _to_ happen
and _eventually_, something _should_ happen.
This is a part of #4135
After creating this CronJob, let's check that the CronJob's Spec fields match what we passed in.
103
103
Note that, because the k8s apiserver may not have finished creating a CronJob after our `Create()` call from earlier, we will use Gomega’s Eventually() testing function instead of Expect() to give the apiserver an opportunity to finish creating our CronJob.
104
104
105
105
`Eventually()` will repeatedly run the function provided as an argument every interval seconds until
106
-
(a) the function’s output matches what’s expected in the subsequent `Should()` call, or
106
+
(a) the assertions done by the passed-in `Gomega` succeed, or
107
107
(b) the number of attempts * interval period exceed the provided timeout value.
108
108
109
109
In the examples below, timeout and interval are Go Duration values of our choosing.
After creating this CronJob, let's check that the CronJob's Spec fields match what we passed in.
121
121
Note that, because the k8s apiserver may not have finished creating a CronJob after our`+" `"+`Create()`+"`"+` call from earlier, we will use Gomega’s Eventually() testing function instead of Expect() to give the apiserver an opportunity to finish creating our CronJob.`+`
122
122
123
123
`+
124
124
"`"+`Eventually()`+"`"+` will repeatedly run the function provided as an argument every interval seconds until
125
-
(a) the function’s output matches what’s expected in the subsequent`+"`"+`Should()`+"`"+` call, or
125
+
(a) the assertions done by the passed-in `+"`"+`Gomega`+"`"+` succeed, or
126
126
(b) the number of attempts * interval period exceed the provided timeout value.
127
127
128
128
In the examples below, timeout and interval are Go Duration values of our choosing.
0 commit comments