Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit cfc4a5b

Browse files
committed
operator: Fix test failure with recent CRD version change
With the recent change of moving to V1 CRD API also needs changes to appropriate test.
1 parent f65ccfb commit cfc4a5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/apis/pmemcsi/v1alpha1/deployment_types_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
api "github.com/intel/pmem-csi/pkg/apis/pmemcsi/v1alpha1"
1515
. "github.com/onsi/ginkgo"
1616
. "github.com/onsi/gomega"
17-
apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
17+
apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
1818
"k8s.io/apimachinery/pkg/api/resource"
1919
"k8s.io/client-go/kubernetes/scheme"
2020
)
@@ -120,7 +120,7 @@ spec:
120120
_, _, err = deserializer.Decode(data, nil, crd)
121121
Expect(err).ShouldNot(HaveOccurred(), "decode crd file")
122122

123-
crdProp := crd.Spec.Validation.OpenAPIV3Schema
123+
crdProp := crd.Spec.Versions[0].Schema.OpenAPIV3Schema
124124
Expect(crdProp).ShouldNot(BeNil(), "Nil CRD schmea")
125125
Expect(crdProp.Type).Should(BeEquivalentTo("object"), "Deployment JSON schema type mismatch")
126126
spec, ok := crdProp.Properties["spec"]

0 commit comments

Comments
 (0)