Skip to content

Commit 362b58e

Browse files
author
Per Goncalves da Silva
committed
Remove error sorting by webhook name
Signed-off-by: Per Goncalves da Silva <[email protected]>
1 parent a1a5a58 commit 362b58e

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

internal/operator-controller/rukpak/render/registryv1/validators/validator.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ func CheckConversionWebhookSupport(rv1 *bundle.RegistryV1) []error {
119119
supportedInstallModes.Insert(mode.Type)
120120
}
121121
}
122-
slices.Sort(conversionWebhookNames)
123122

124123
if len(supportedInstallModes) != 1 || !supportedInstallModes.Has(v1alpha1.InstallModeTypeAllNamespaces) {
125124
sortedModes := slices.Sorted(slices.Values(supportedInstallModes.UnsortedList()))

internal/operator-controller/rukpak/render/registryv1/validators/validator_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,8 @@ func Test_CheckWebhookSupport(t *testing.T) {
306306
),
307307
},
308308
expectedErrs: []error{
309-
// Webhook names and install modes are sorted in alphanumerical order
310-
errors.New("bundle contains conversion webhook \"webhook-a\" and supports install modes [AllNamespaces SingleNamespace] - conversion webhooks are only supported for bundles that only support AllNamespaces install mode"),
311309
errors.New("bundle contains conversion webhook \"webhook-b\" and supports install modes [AllNamespaces SingleNamespace] - conversion webhooks are only supported for bundles that only support AllNamespaces install mode"),
310+
errors.New("bundle contains conversion webhook \"webhook-a\" and supports install modes [AllNamespaces SingleNamespace] - conversion webhooks are only supported for bundles that only support AllNamespaces install mode"),
312311
},
313312
},
314313
} {

0 commit comments

Comments
 (0)