@@ -8,47 +8,47 @@ import (
8
8
. "github.com/onsi/gomega"
9
9
)
10
10
11
- // DeterminedE2eClient wraps E2eClient calls in an Eventually assertion to keep trying
11
+ // DeterminedE2EClient wraps E2eClient calls in an Eventually assertion to keep trying
12
12
// or bail after some time if unsuccessful
13
- type DeterminedE2eClient struct {
13
+ type DeterminedE2EClient struct {
14
14
* E2EKubeClient
15
15
}
16
16
17
- func NewDeterminedClient (e2eKubeClient * E2EKubeClient ) * DeterminedE2eClient {
18
- return & DeterminedE2eClient {
17
+ func NewDeterminedClient (e2eKubeClient * E2EKubeClient ) * DeterminedE2EClient {
18
+ return & DeterminedE2EClient {
19
19
e2eKubeClient ,
20
20
}
21
21
}
22
22
23
- func (m * DeterminedE2eClient ) Create (context context.Context , obj k8scontrollerclient.Object , options ... k8scontrollerclient.CreateOption ) error {
23
+ func (m * DeterminedE2EClient ) Create (context context.Context , obj k8scontrollerclient.Object , options ... k8scontrollerclient.CreateOption ) error {
24
24
m .keepTrying (func () error {
25
25
err := m .E2EKubeClient .Create (context , obj , options ... )
26
26
return err
27
27
})
28
28
return nil
29
29
}
30
30
31
- func (m * DeterminedE2eClient ) Update (context context.Context , obj k8scontrollerclient.Object , options ... k8scontrollerclient.UpdateOption ) error {
31
+ func (m * DeterminedE2EClient ) Update (context context.Context , obj k8scontrollerclient.Object , options ... k8scontrollerclient.UpdateOption ) error {
32
32
m .keepTrying (func () error {
33
33
return m .E2EKubeClient .Update (context , obj , options ... )
34
34
})
35
35
return nil
36
36
}
37
37
38
- func (m * DeterminedE2eClient ) Delete (context context.Context , obj k8scontrollerclient.Object , options ... k8scontrollerclient.DeleteOption ) error {
38
+ func (m * DeterminedE2EClient ) Delete (context context.Context , obj k8scontrollerclient.Object , options ... k8scontrollerclient.DeleteOption ) error {
39
39
m .keepTrying (func () error {
40
40
return m .E2EKubeClient .Delete (context , obj , options ... )
41
41
})
42
42
return nil
43
43
}
44
44
45
- func (m * DeterminedE2eClient ) Patch (context context.Context , obj k8scontrollerclient.Object , patch k8scontrollerclient.Patch , options ... k8scontrollerclient.PatchOption ) error {
45
+ func (m * DeterminedE2EClient ) Patch (context context.Context , obj k8scontrollerclient.Object , patch k8scontrollerclient.Patch , options ... k8scontrollerclient.PatchOption ) error {
46
46
m .keepTrying (func () error {
47
47
return m .E2EKubeClient .Patch (context , obj , patch , options ... )
48
48
})
49
49
return nil
50
50
}
51
51
52
- func (m * DeterminedE2eClient ) keepTrying (fn func () error ) {
52
+ func (m * DeterminedE2EClient ) keepTrying (fn func () error ) {
53
53
Eventually (fn ).Should (Succeed ())
54
54
}
0 commit comments