@@ -29,7 +29,7 @@ func checkDefaultClient() {
29
29
// It can be used with gomega.Eventually() like this
30
30
//
31
31
// deployment := appsv1.Deployment{ ... }
32
- // gomega.Eventually(komega.Get(&deployment)).To (gomega.Succeed())
32
+ // gomega.Eventually(komega.Get(&deployment)).Should (gomega.Succeed())
33
33
//
34
34
// By calling the returned function directly it can also be used with gomega.Expect(komega.Get(...)()).To(...)
35
35
func Get (obj client.Object ) func () error {
@@ -41,7 +41,7 @@ func Get(obj client.Object) func() error {
41
41
// It can be used with gomega.Eventually() like this
42
42
//
43
43
// deployments := v1.DeploymentList{ ... }
44
- // gomega.Eventually(k.List(&deployments)).To (gomega.Succeed())
44
+ // gomega.Eventually(k.List(&deployments)).Should (gomega.Succeed())
45
45
//
46
46
// By calling the returned function directly it can also be used as gomega.Expect(k.List(...)()).To(...)
47
47
func List (list client.ObjectList , opts ... client.ListOption ) func () error {
@@ -55,7 +55,7 @@ func List(list client.ObjectList, opts ...client.ListOption) func() error {
55
55
// deployment := appsv1.Deployment{ ... }
56
56
// gomega.Eventually(k.Update(&deployment, func() {
57
57
// deployment.Spec.Replicas = 3
58
- // })).To (gomega.Succeed())
58
+ // })).Should (gomega.Succeed())
59
59
//
60
60
// By calling the returned function directly it can also be used as gomega.Expect(k.Update(...)()).To(...)
61
61
func Update (obj client.Object , f func (), opts ... client.UpdateOption ) func () error {
@@ -69,7 +69,7 @@ func Update(obj client.Object, f func(), opts ...client.UpdateOption) func() err
69
69
// deployment := appsv1.Deployment{ ... }
70
70
// gomega.Eventually(k.UpdateStatus(&deployment, func() {
71
71
// deployment.Status.AvailableReplicas = 1
72
- // })).To (gomega.Succeed())
72
+ // })).Should (gomega.Succeed())
73
73
//
74
74
// By calling the returned function directly it can also be used as gomega.Expect(k.UpdateStatus(...)()).To(...)
75
75
func UpdateStatus (obj client.Object , f func (), opts ... client.SubResourceUpdateOption ) func () error {
@@ -81,7 +81,7 @@ func UpdateStatus(obj client.Object, f func(), opts ...client.SubResourceUpdateO
81
81
// It can be used with gomega.Eventually() like this:
82
82
//
83
83
// deployment := appsv1.Deployment{ ... }
84
- // gomega.Eventually(k.Object(&deployment)).To (HaveField("Spec.Replicas", gomega.Equal(ptr.To(3))))
84
+ // gomega.Eventually(k.Object(&deployment)).Should (HaveField("Spec.Replicas", gomega.Equal(ptr.To(3))))
85
85
//
86
86
// By calling the returned function directly it can also be used as gomega.Expect(k.Object(...)()).To(...)
87
87
func Object (obj client.Object ) func () (client.Object , error ) {
@@ -93,7 +93,7 @@ func Object(obj client.Object) func() (client.Object, error) {
93
93
// It can be used with gomega.Eventually() like this:
94
94
//
95
95
// deployments := appsv1.DeploymentList{ ... }
96
- // gomega.Eventually(k.ObjectList(&deployments)).To (HaveField("Items", HaveLen(1)))
96
+ // gomega.Eventually(k.ObjectList(&deployments)).Should (HaveField("Items", HaveLen(1)))
97
97
//
98
98
// By calling the returned function directly it can also be used as gomega.Expect(k.ObjectList(...)()).To(...)
99
99
func ObjectList (list client.ObjectList , opts ... client.ListOption ) func () (client.ObjectList , error ) {
0 commit comments