Skip to content

Commit 116b8e1

Browse files
fix lint and sanity errors
Signed-off-by: Rashmi Gottipati <rgottipa@redhat.com>
1 parent 1e9cded commit 116b8e1

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

internal/operator-controller/catalogmetadata/compare/compare_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,18 +211,18 @@ func TestByVersionAndRelease_WithCompositeVersionComparison(t *testing.T) {
211211
t.Run("feature gate disabled - uses build metadata", func(t *testing.T) {
212212
require.NoError(t, features.OperatorControllerFeatureGate.Set(fmt.Sprintf("%s=false", features.CompositeVersionComparison)))
213213
result := compare.ByVersionAndRelease(registryV1_b1, registryV1_b2)
214-
assert.Greater(t, result, 0, "should sort by build metadata: 1.0.0+2 > 1.0.0+1")
214+
assert.Positive(t, result, "should sort by build metadata: 1.0.0+2 > 1.0.0+1")
215215
})
216216

217217
t.Run("feature gate enabled - registry+v1 bundles use build metadata fallback", func(t *testing.T) {
218218
require.NoError(t, features.OperatorControllerFeatureGate.Set(fmt.Sprintf("%s=true", features.CompositeVersionComparison)))
219219
result := compare.ByVersionAndRelease(registryV1_b1, registryV1_b2)
220-
assert.Greater(t, result, 0, "should fallback to build metadata: 1.0.0+2 > 1.0.0+1")
220+
assert.Positive(t, result, "should fallback to build metadata: 1.0.0+2 > 1.0.0+1")
221221
})
222222

223223
t.Run("feature gate enabled - new format bundles use .spec.release", func(t *testing.T) {
224224
require.NoError(t, features.OperatorControllerFeatureGate.Set(fmt.Sprintf("%s=true", features.CompositeVersionComparison)))
225225
result := compare.ByVersionAndRelease(newFormat_b1, newFormat_b2)
226-
assert.Greater(t, result, 0, "should use .spec.release: release=2 > release=1")
226+
assert.Positive(t, result, "should use .spec.release: release=2 > release=1")
227227
})
228228
}

internal/operator-controller/features/features.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package features
22

33
import (
44
"github.com/go-logr/logr"
5-
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
5+
"k8s.io/apimachinery/pkg/util/runtime"
66
"k8s.io/component-base/featuregate"
77

88
featuregatesutil "github.com/operator-framework/operator-controller/internal/shared/util/featuregates"
@@ -17,9 +17,9 @@ const (
1717
WebhookProviderCertManager featuregate.Feature = "WebhookProviderCertManager"
1818
WebhookProviderOpenshiftServiceCA featuregate.Feature = "WebhookProviderOpenshiftServiceCA"
1919
HelmChartSupport featuregate.Feature = "HelmChartSupport"
20-
BoxcutterRuntime featuregate.Feature = "BoxcutterRuntime"
21-
DeploymentConfig featuregate.Feature = "DeploymentConfig"
22-
CompositeVersionComparison featuregate.Feature = "CompositeVersionComparison"
20+
BoxcutterRuntime featuregate.Feature = "BoxcutterRuntime"
21+
DeploymentConfig featuregate.Feature = "DeploymentConfig"
22+
CompositeVersionComparison featuregate.Feature = "CompositeVersionComparison"
2323
)
2424

2525
var operatorControllerFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{
@@ -106,7 +106,7 @@ var operatorControllerFeatureGates = map[featuregate.Feature]featuregate.Feature
106106
var OperatorControllerFeatureGate featuregate.MutableFeatureGate = featuregate.NewFeatureGate()
107107

108108
func init() {
109-
utilruntime.Must(OperatorControllerFeatureGate.Add(operatorControllerFeatureGates))
109+
runtime.Must(OperatorControllerFeatureGate.Add(operatorControllerFeatureGates))
110110
}
111111

112112
// LogFeatureGateStates logs the state of all known feature gates.

0 commit comments

Comments
 (0)