Skip to content

Commit 97b64e1

Browse files
exdxperdasilva
andauthoredJun 15, 2022
Refactor DeterminedE2eClient to DeterminedE2EClient (#2801)
Signed-off-by: perdasilva <[email protected]> Co-authored-by: perdasilva <[email protected]>
1 parent a538831 commit 97b64e1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed
 

Diff for: ‎test/e2e/util/e2e_determined_client.go

+9-9
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,47 @@ import (
88
. "github.com/onsi/gomega"
99
)
1010

11-
// DeterminedE2eClient wraps E2eClient calls in an Eventually assertion to keep trying
11+
// DeterminedE2EClient wraps E2eClient calls in an Eventually assertion to keep trying
1212
// or bail after some time if unsuccessful
13-
type DeterminedE2eClient struct {
13+
type DeterminedE2EClient struct {
1414
*E2EKubeClient
1515
}
1616

17-
func NewDeterminedClient(e2eKubeClient *E2EKubeClient) *DeterminedE2eClient {
18-
return &DeterminedE2eClient{
17+
func NewDeterminedClient(e2eKubeClient *E2EKubeClient) *DeterminedE2EClient {
18+
return &DeterminedE2EClient{
1919
e2eKubeClient,
2020
}
2121
}
2222

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 {
2424
m.keepTrying(func() error {
2525
err := m.E2EKubeClient.Create(context, obj, options...)
2626
return err
2727
})
2828
return nil
2929
}
3030

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 {
3232
m.keepTrying(func() error {
3333
return m.E2EKubeClient.Update(context, obj, options...)
3434
})
3535
return nil
3636
}
3737

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 {
3939
m.keepTrying(func() error {
4040
return m.E2EKubeClient.Delete(context, obj, options...)
4141
})
4242
return nil
4343
}
4444

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 {
4646
m.keepTrying(func() error {
4747
return m.E2EKubeClient.Patch(context, obj, patch, options...)
4848
})
4949
return nil
5050
}
5151

52-
func (m *DeterminedE2eClient) keepTrying(fn func() error) {
52+
func (m *DeterminedE2EClient) keepTrying(fn func() error) {
5353
Eventually(fn).Should(Succeed())
5454
}

0 commit comments

Comments
 (0)
Please sign in to comment.