Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mboersma committed Dec 20, 2024
1 parent 986debd commit afe23d0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion api/v1beta1/azurecluster_default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ func TestAPIServerLBDefaults(t *testing.T) {
tc := c
t.Run(tc.name, func(t *testing.T) {
if tc.featureGate != "" {
defer featuregatetesting.SetFeatureGateDuringTest(t, feature.Gates, tc.featureGate, true)()
featuregatetesting.SetFeatureGateDuringTest(t, feature.Gates, tc.featureGate, true)
}
tc.cluster.setAPIServerLBDefaults()
if !reflect.DeepEqual(tc.cluster, tc.output) {
Expand Down
2 changes: 1 addition & 1 deletion api/v1beta1/azurecluster_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ func TestValidateAPIServerLB(t *testing.T) {
t.Run(test.name, func(t *testing.T) {
g := NewWithT(t)
if test.featureGate == feature.APIServerILB {
defer featuregatetesting.SetFeatureGateDuringTest(t, feature.Gates, test.featureGate, true)()
featuregatetesting.SetFeatureGateDuringTest(t, feature.Gates, test.featureGate, true)
}
err := validateAPIServerLB(&test.lb, &test.old, test.cpCIDRS, field.NewPath("apiServerLB"))
if test.wantErr {
Expand Down
3 changes: 1 addition & 2 deletions azure/services/aso/aso.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,7 @@ func isOwnedBy(resource client.Object, owner client.Object, scheme *runtime.Sche
}

func hasLegacyOwnedByLabel(labels map[string]string, clusterName string) bool {
//nolint:staticcheck // Referencing this deprecated value is required for backwards compatibility.
return labels[infrav1.OwnedByClusterLabelKey] == clusterName
return labels[infrav1.OwnedByClusterLabelKey] == clusterName //nolint:staticcheck // Referencing this deprecated value is required for backwards compatibility.
}

// PauseResource pauses an ASO resource by updating its `reconcile-policy` to `skip`.
Expand Down
5 changes: 2 additions & 3 deletions azure/services/aso/aso_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,8 @@ func TestCreateOrUpdateResource(t *testing.T) {
Name: "name",
Namespace: "namespace",
Labels: map[string]string{
clusterv1.ClusterNameLabel: clusterName,
//nolint:staticcheck // Referencing this deprecated value is required for backwards compatibility.
infrav1.OwnedByClusterLabelKey: clusterName,
clusterv1.ClusterNameLabel: clusterName,
infrav1.OwnedByClusterLabelKey: clusterName, //nolint:staticcheck // Referencing this deprecated value is required for backwards compatibility.
},
Annotations: map[string]string{
asoannotations.ReconcilePolicy: string(asoannotations.ReconcilePolicySkip),
Expand Down

0 comments on commit afe23d0

Please sign in to comment.