Skip to content

Commit 1659664

Browse files
committed
Fix validate CRD compatibility check and deprecated CRD test case
1. Fix validate CRD compatibility Should only run against served versions instead the non-served versions (! operator error) 2. Clean up the deprecated CRD versions test: Using standup catsrc upgrade and get rid of unnecessary subscription deletion. Signed-off-by: Vu Dinh <[email protected]>
1 parent 41f8271 commit 1659664

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/controller/operators/catalog/operator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ func (o *Operator) validateCustomResourceDefinition(oldCRD *v1beta1ext.CustomRes
13761376
return err
13771377
}
13781378
for _, version := range oldCRD.Spec.Versions {
1379-
if !version.Served {
1379+
if version.Served {
13801380
gvr := schema.GroupVersionResource{Group: oldCRD.Spec.Group, Version: version.Name, Resource: oldCRD.Spec.Names.Plural}
13811381
err := o.validateExistingCRs(gvr, convertedCRD)
13821382
if err != nil {

0 commit comments

Comments
 (0)