Skip to content

Commit

Permalink
use strings.EqualFold
Browse files Browse the repository at this point in the history
Signed-off-by: Calum Murray <cmurray@redhat.com>
  • Loading branch information
Cali0707 committed Apr 12, 2024
1 parent f092649 commit 6814585
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions control-plane/pkg/reconciler/consumer/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,9 @@ func NewController(ctx context.Context, watcher configmap.Watcher) *controller.I
return nil, false

Check warning on line 97 in control-plane/pkg/reconciler/consumer/controller.go

View check run for this annotation

Codecov / codecov/patch

control-plane/pkg/reconciler/consumer/controller.go#L95-L97

Added lines #L95 - L97 were not covered by tests
}

for _, ref := range c.GetOwnerReferences() {
if ref.Kind == "ConsumerGroup" {
cg, err := r.ConsumerGroupLister.ConsumerGroups(c.GetNamespace()).Get(ref.Name)
return cg, err == nil
}
}

return nil, false
cgRef := c.GetConsumerGroup()
cg, err := r.ConsumerGroupLister.ConsumerGroups(c.GetNamespace()).Get(cgRef.Name)
return cg, err == nil

Check warning on line 102 in control-plane/pkg/reconciler/consumer/controller.go

View check run for this annotation

Codecov / codecov/patch

control-plane/pkg/reconciler/consumer/controller.go#L100-L102

Added lines #L100 - L102 were not covered by tests
})

trustBundleConfigMapInformer.Informer().AddEventHandler(controller.HandleAll(globalResync))
Expand Down
2 changes: 1 addition & 1 deletion control-plane/pkg/reconciler/consumergroup/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func ResyncOnStatefulSetChange(ctx context.Context, filteredResync func(f func(i
return false

Check warning on line 220 in control-plane/pkg/reconciler/consumergroup/controller.go

View check run for this annotation

Codecov / codecov/patch

control-plane/pkg/reconciler/consumergroup/controller.go#L217-L220

Added lines #L217 - L220 were not covered by tests
}
for _, owner := range cg.OwnerReferences {
if owner.Kind == kind {
if strings.EqualFold(owner.Kind, kind) {
return true

Check warning on line 224 in control-plane/pkg/reconciler/consumergroup/controller.go

View check run for this annotation

Codecov / codecov/patch

control-plane/pkg/reconciler/consumergroup/controller.go#L222-L224

Added lines #L222 - L224 were not covered by tests
}
}
Expand Down

0 comments on commit 6814585

Please sign in to comment.