Skip to content

Commit

Permalink
Merge pull request #888 from wking/drop-previous-version-reference
Browse files Browse the repository at this point in the history
lib/validation: Drop "a previous version" from desiredUpdate validation
  • Loading branch information
openshift-merge-robot authored Jan 25, 2023
2 parents ed2d80a + 7690401 commit 50b7c5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func ValidateClusterVersion(config *configv1.ClusterVersion) field.ErrorList {
switch countPayloadsForVersion(config, u.Version) {
case 0:
errs = append(errs, field.Invalid(field.NewPath("spec", "desiredUpdate", "version"), u.Version,
"when image is empty the update must be a previous version or an available update"))
"when image is empty the update must be an available update"))
case 1:
default:
errs = append(errs, field.Invalid(field.NewPath("spec", "desiredUpdate", "version"), u.Version,
Expand Down
2 changes: 1 addition & 1 deletion pkg/cvo/cvo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ func TestOperator_sync(t *testing.T) {
},
ObservedGeneration: 2,
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: ClusterVersionInvalid, Status: configv1.ConditionTrue, Reason: "InvalidClusterVersion", Message: "The cluster version is invalid: spec.desiredUpdate.version: Invalid value: \"4.0.4\": when image is empty the update must be a previous version or an available update"},
{Type: ClusterVersionInvalid, Status: configv1.ConditionTrue, Reason: "InvalidClusterVersion", Message: "The cluster version is invalid: spec.desiredUpdate.version: Invalid value: \"4.0.4\": when image is empty the update must be an available update"},
{Type: ImplicitlyEnabledCapabilities, Status: "False", Reason: "AsExpected", Message: "Capabilities match configured spec"},
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 4.0.1"},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
Expand Down

0 comments on commit 50b7c5f

Please sign in to comment.