Skip to content

Commit

Permalink
adding tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Keister <[email protected]>
  • Loading branch information
grokspawn committed Dec 6, 2024
1 parent bc4d860 commit 8c34a0c
Show file tree
Hide file tree
Showing 3 changed files with 1,949 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/controller/operators/catalog/operator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1835,6 +1835,14 @@ func TestValidateV1Beta1CRDCompatibility(t *testing.T) {
newCRD: unversionedCRDForV1beta1File("testdata/apiextensionsv1beta1/crd.no-versions-list.yaml"),
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")},
},
{
name: "crd with incorrect comparison",
existingObjects: []runtime.Object{
unstructuredForFile("testdata/postgrestolerations/pgadmin.cr.yaml"),
},
oldCRD: unversionedCRDForV1beta1File("testdata/postgrestolerations/crd.yaml"),
newCRD: unversionedCRDForV1beta1File("testdata/postgrestolerations/crd.yaml"),
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
Loading

0 comments on commit 8c34a0c

Please sign in to comment.