Skip to content

Commit

Permalink
Fix linter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jotak committed Aug 24, 2023
1 parent 99ee681 commit c51cbea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions controllers/consoleplugin/consoleplugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ func TestDashboardsPerOCPVersion(t *testing.T) {
}, dashboards)

// 4.14 introduces new dashboards; check exact version
r.ClusterInfo.SetOpenShiftVersion("4.14.0")
r.ClusterInfo.SetOpenShiftVersion("4.15.0")
dashboards = r.getAvailableDashboards(context.Background())
sort.Strings(dashboards)
assert.Equal(t, []string{
Expand All @@ -392,7 +392,7 @@ func TestDashboardsPerOCPVersion(t *testing.T) {
}, dashboards)

// Check future versions
r.ClusterInfo.SetOpenShiftVersion("4.14.5")
r.ClusterInfo.SetOpenShiftVersion("4.15.5")
dashboards = r.getAvailableDashboards(context.Background())
sort.Strings(dashboards)
assert.Equal(t, []string{
Expand Down
6 changes: 3 additions & 3 deletions controllers/flowcollector_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (r *FlowCollectorReconciler) Reconcile(ctx context.Context, _ ctrl.Request)

var didChange, isInProgress bool
previousNamespace := desired.Status.Namespace
reconcilersInfo := r.newCommonInfo(ctx, desired, ns, previousNamespace, func(b bool) { didChange = b }, func(b bool) { isInProgress = b })
reconcilersInfo := r.newCommonInfo(desired, ns, previousNamespace, func(b bool) { didChange = b }, func(b bool) { isInProgress = b })

err = r.reconcileOperator(ctx, &reconcilersInfo, desired)
if err != nil {
Expand Down Expand Up @@ -357,7 +357,7 @@ func (r *FlowCollectorReconciler) checkFinalizer(ctx context.Context, desired *f
func (r *FlowCollectorReconciler) finalize(ctx context.Context, desired *flowslatest.FlowCollector) error {
if !r.clusterInfo.HasCNO() {
ns := getNamespaceName(desired)
info := r.newCommonInfo(ctx, desired, ns, ns, func(b bool) {}, func(b bool) {})
info := r.newCommonInfo(desired, ns, ns, func(b bool) {}, func(b bool) {})
ovsConfigController := ovs.NewFlowsConfigOVNKController(&info, desired.Spec.Agent.IPFIX.OVNKubernetes)
if err := ovsConfigController.Finalize(ctx, desired); err != nil {
return fmt.Errorf("failed to finalize ovn-kubernetes reconciler: %w", err)
Expand All @@ -366,7 +366,7 @@ func (r *FlowCollectorReconciler) finalize(ctx context.Context, desired *flowsla
return nil
}

func (r *FlowCollectorReconciler) newCommonInfo(ctx context.Context, desired *flowslatest.FlowCollector, ns, prevNs string, changeHook, inProgressHook func(bool)) reconcilers.Common {
func (r *FlowCollectorReconciler) newCommonInfo(desired *flowslatest.FlowCollector, ns, prevNs string, changeHook, inProgressHook func(bool)) reconcilers.Common {
return reconcilers.Common{
Client: helper.Client{
Client: r.Client,
Expand Down

0 comments on commit c51cbea

Please sign in to comment.