Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/validation/internal/operatorhub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pkg/validation/internal/operatorhub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down