Skip to content

Commit a5c0e9e

Browse files
committed
Update test assumption to update annotations
Signed-off-by: twobiers <[email protected]>
1 parent 845246c commit a5c0e9e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pkg/reconciler/managed/api_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -543,12 +543,12 @@ func TestRetryingCriticalAnnotationUpdater(t *testing.T) {
543543
o client.Object
544544
}
545545

546-
setLabels := func(obj client.Object) error {
547-
obj.SetLabels(map[string]string{"getcalled": "true"})
546+
setAnnotations := func(obj client.Object) error {
547+
obj.SetAnnotations(map[string]string{"getcalled": "true"})
548548
return nil
549549
}
550550
objectReturnedByGet := &fake.LegacyManaged{}
551-
setLabels(objectReturnedByGet)
551+
setAnnotations(objectReturnedByGet)
552552

553553
cases := map[string]struct {
554554
reason string
@@ -559,7 +559,7 @@ func TestRetryingCriticalAnnotationUpdater(t *testing.T) {
559559
"UpdateConflictGetError": {
560560
reason: "We should return any error we encounter getting the supplied object",
561561
c: &test.MockClient{
562-
MockGet: test.NewMockGetFn(errBoom, setLabels),
562+
MockGet: test.NewMockGetFn(errBoom, setAnnotations),
563563
MockPatch: test.NewMockPatchFn(kerrors.NewConflict(schema.GroupResource{
564564
Group: "foo.com",
565565
Resource: "bars",
@@ -576,7 +576,7 @@ func TestRetryingCriticalAnnotationUpdater(t *testing.T) {
576576
"UpdateError": {
577577
reason: "We should return any error we encounter updating the supplied object",
578578
c: &test.MockClient{
579-
MockGet: test.NewMockGetFn(nil, setLabels),
579+
MockGet: test.NewMockGetFn(nil, setAnnotations),
580580
MockPatch: test.NewMockPatchFn(errBoom),
581581
},
582582
args: args{
@@ -590,7 +590,7 @@ func TestRetryingCriticalAnnotationUpdater(t *testing.T) {
590590
"SuccessfulGetAfterAConflict": {
591591
reason: "A successful get after a conflict should not hide the conflict error and prevent retries",
592592
c: &test.MockClient{
593-
MockGet: test.NewMockGetFn(nil, setLabels),
593+
MockGet: test.NewMockGetFn(nil, setAnnotations),
594594
MockPatch: test.NewMockPatchFn(kerrors.NewConflict(schema.GroupResource{
595595
Group: "foo.com",
596596
Resource: "bars",
@@ -610,7 +610,7 @@ func TestRetryingCriticalAnnotationUpdater(t *testing.T) {
610610
"Success": {
611611
reason: "We should return without error if we successfully update our annotations",
612612
c: &test.MockClient{
613-
MockGet: test.NewMockGetFn(nil, setLabels),
613+
MockGet: test.NewMockGetFn(nil, setAnnotations),
614614
MockPatch: test.NewMockPatchFn(errBoom),
615615
},
616616
args: args{

0 commit comments

Comments
 (0)