From 86b3eedf10af6f5e122052876e9c2f7d4c334edf Mon Sep 17 00:00:00 2001 From: Camila Macedo Date: Wed, 9 Jun 2021 17:15:45 +0100 Subject: [PATCH] feat: update the channel nammming conv --- pkg/validation/internal/operatorhub.go | 4 ++-- pkg/validation/internal/operatorhub_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/validation/internal/operatorhub.go b/pkg/validation/internal/operatorhub.go index e9ad38982..2aa455305 100644 --- a/pkg/validation/internal/operatorhub.go +++ b/pkg/validation/internal/operatorhub.go @@ -130,13 +130,13 @@ func validateBundleOperatorHub(bundle *manifests.Bundle, k8sVersion string) erro // authors knows if their operator bundles are or not respecting the Naming Convention Rules. // However, the operator authors still able to choose the names as please them. func validateHubChannels(channels []string) error { - const preview = "preview" + const candidate = "candidate" const stable = "stable" const fast = "fast" var channelsNotFollowingConventional []string for _, channel := range channels { - if !strings.HasPrefix(channel, preview) && + if !strings.HasPrefix(channel, candidate) && !strings.HasPrefix(channel, stable) && !strings.HasPrefix(channel, fast) { channelsNotFollowingConventional = append(channelsNotFollowingConventional, channel) diff --git a/pkg/validation/internal/operatorhub_test.go b/pkg/validation/internal/operatorhub_test.go index 77bdaaac5..b4aa2ef85 100644 --- a/pkg/validation/internal/operatorhub_test.go +++ b/pkg/validation/internal/operatorhub_test.go @@ -474,7 +474,7 @@ func TestValidateHubChannels(t *testing.T) { { name: "should not return warning when the channel names following the convention", args: args{ - channels: []string{"fast", "preview"}, + channels: []string{"fast", "candidate"}, }, wantWarn: false, },