Skip to content

Commit 6503564

Browse files
committed
NO-ISSUE: Minor style change for operators
1 parent b990f59 commit 6503564

20 files changed

Lines changed: 23 additions & 21 deletions

internal/operators/authorino/authorino_operator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (o *operator) GetDependencies(c *common.Cluster) []string {
6363
}
6464

6565
func (o *operator) GetDependenciesFeatureSupportID() []models.FeatureSupportLevelID {
66-
return nil
66+
return []models.FeatureSupportLevelID{}
6767
}
6868

6969
// GetClusterValidationIDs returns cluster validation IDs for the operator.

internal/operators/clusterobservability/cluster_observability_operator.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/lib/pq"
77
"github.com/openshift/assisted-service/internal/common"
88
operatorscommon "github.com/openshift/assisted-service/internal/operators/common"
9+
"github.com/openshift/assisted-service/internal/operators/openshiftlogging"
910
"github.com/openshift/assisted-service/internal/templating"
1011
"github.com/openshift/assisted-service/models"
1112
"github.com/sirupsen/logrus"
@@ -51,7 +52,7 @@ func (o *operator) GetFullName() string {
5152

5253
// GetDependencies provides a list of dependencies of the Operator
5354
func (o *operator) GetDependencies(cluster *common.Cluster) []string {
54-
return []string{"openshift-logging"}
55+
return []string{openshiftlogging.Operator.Name}
5556
}
5657

5758
func (o *operator) GetDependenciesFeatureSupportID() []models.FeatureSupportLevelID {

internal/operators/cnv/cnv_operator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (o *operator) GetDependencies(cluster *common.Cluster) []string {
6969
}
7070

7171
func (o *operator) GetDependenciesFeatureSupportID() []models.FeatureSupportLevelID {
72-
return nil
72+
return []models.FeatureSupportLevelID{}
7373
}
7474

7575
// GetClusterValidationIDs returns cluster validation IDs for the Operator

internal/operators/kmm/kmm_operator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (o *operator) GetDependencies(c *common.Cluster) []string {
6565
}
6666

6767
func (o *operator) GetDependenciesFeatureSupportID() []models.FeatureSupportLevelID {
68-
return nil
68+
return []models.FeatureSupportLevelID{}
6969
}
7070

7171
// GetClusterValidationIDs returns cluster validation IDs for the operator.

internal/operators/kubedescheduler/kube_descheduler_operator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (o *operator) GetDependencies(cluster *common.Cluster) []string {
5555
}
5656

5757
func (o *operator) GetDependenciesFeatureSupportID() []models.FeatureSupportLevelID {
58-
return nil
58+
return []models.FeatureSupportLevelID{}
5959
}
6060

6161
// GetClusterValidationIDs returns cluster validation IDs for the Operator

internal/operators/loki/loki_operator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (o *operator) GetDependencies(cluster *common.Cluster) []string {
6464
}
6565

6666
func (o *operator) GetDependenciesFeatureSupportID() []models.FeatureSupportLevelID {
67-
return nil
67+
return []models.FeatureSupportLevelID{}
6868
}
6969

7070
// GetClusterValidationIDs returns cluster validation IDs for the Operator

internal/operators/loki/loki_operator_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ var _ = Describe("Loki Operator", func() {
4646
})
4747

4848
Context("GetDependenciesFeatureSupportID", func() {
49-
It("should return nil for no dependencies", func() {
49+
It("should return no dependencies", func() {
5050
deps := operator.GetDependenciesFeatureSupportID()
51-
Expect(deps).To(BeNil())
51+
Expect(deps).To(BeEmpty())
5252
})
5353
})
5454

internal/operators/lso/ls_operator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (l *lsOperator) GetDependencies(cluster *common.Cluster) []string {
4545
}
4646

4747
func (o *lsOperator) GetDependenciesFeatureSupportID() []models.FeatureSupportLevelID {
48-
return nil
48+
return []models.FeatureSupportLevelID{}
4949
}
5050

5151
// GetClusterValidationIDs returns cluster validation IDs for the Operator

internal/operators/lvm/lvm_operator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (o *operator) GetDependencies(cluster *common.Cluster) []string {
7171
}
7272

7373
func (o *operator) GetDependenciesFeatureSupportID() []models.FeatureSupportLevelID {
74-
return nil
74+
return []models.FeatureSupportLevelID{}
7575
}
7676

7777
// GetClusterValidationIDs returns cluster validation IDs for the Operator

internal/operators/mce/mce_operator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (o *operator) GetDependencies(cluster *common.Cluster) []string {
6868
}
6969

7070
func (o *operator) GetDependenciesFeatureSupportID() []models.FeatureSupportLevelID {
71-
return nil
71+
return []models.FeatureSupportLevelID{}
7272
}
7373

7474
// GetClusterValidationIDs returns cluster validation IDs for the operator.

0 commit comments

Comments
 (0)