Skip to content

Commit 6dd3f70

Browse files
camilamacedo86timflannagan
authored andcommitted
feat: update the channel nammming conv (openshift#129)
Upstream-repository: api Upstream-commit: f0e01e74c12537cccf8f9dfc6f76b0d4393b0572
1 parent 03b6e7e commit 6dd3f70

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

staging/api/pkg/validation/internal/operatorhub.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ func validateBundleOperatorHub(bundle *manifests.Bundle, k8sVersion string) erro
130130
// authors knows if their operator bundles are or not respecting the Naming Convention Rules.
131131
// However, the operator authors still able to choose the names as please them.
132132
func validateHubChannels(channels []string) error {
133-
const preview = "preview"
133+
const candidate = "candidate"
134134
const stable = "stable"
135135
const fast = "fast"
136136

137137
var channelsNotFollowingConventional []string
138138
for _, channel := range channels {
139-
if !strings.HasPrefix(channel, preview) &&
139+
if !strings.HasPrefix(channel, candidate) &&
140140
!strings.HasPrefix(channel, stable) &&
141141
!strings.HasPrefix(channel, fast) {
142142
channelsNotFollowingConventional = append(channelsNotFollowingConventional, channel)

staging/api/pkg/validation/internal/operatorhub_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ func TestValidateHubChannels(t *testing.T) {
474474
{
475475
name: "should not return warning when the channel names following the convention",
476476
args: args{
477-
channels: []string{"fast", "preview"},
477+
channels: []string{"fast", "candidate"},
478478
},
479479
wantWarn: false,
480480
},

0 commit comments

Comments
 (0)