Skip to content

Commit 8b90dab

Browse files
committed
adding tests
Signed-off-by: Jordan Keister <[email protected]>
1 parent 6405543 commit 8b90dab

File tree

3 files changed

+1949
-0
lines changed

3 files changed

+1949
-0
lines changed

Diff for: pkg/controller/operators/catalog/operator_test.go

+8
Original file line numberDiff line numberDiff line change
@@ -1835,6 +1835,14 @@ func TestValidateV1Beta1CRDCompatibility(t *testing.T) {
18351835
newCRD: unversionedCRDForV1beta1File("testdata/apiextensionsv1beta1/crd.no-versions-list.yaml"),
18361836
want: validationError{fmt.Errorf("error validating cluster.com/v1alpha1, Kind=testcrd \"my-cr-1\": updated validation is too restrictive: [].spec.scalar: Invalid value: 2: spec.scalar in body should be greater than or equal to 3")},
18371837
},
1838+
{
1839+
name: "crd with incorrect comparison",
1840+
existingObjects: []runtime.Object{
1841+
unstructuredForFile("testdata/postgrestolerations/pgadmin.cr.yaml"),
1842+
},
1843+
oldCRD: unversionedCRDForV1beta1File("testdata/postgrestolerations/crd.yaml"),
1844+
newCRD: unversionedCRDForV1beta1File("testdata/postgrestolerations/crd.yaml"),
1845+
},
18381846
}
18391847
for _, tt := range tests {
18401848
t.Run(tt.name, func(t *testing.T) {

0 commit comments

Comments
 (0)