Skip to content

Commit

Permalink
adding error handling in the TestTruncateCRDFieldTransformer yaml par…
Browse files Browse the repository at this point in the history
…sing
  • Loading branch information
ayushsatyam146 committed May 3, 2024
1 parent 4ebe224 commit 545c0d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/common/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ func TestTruncateCRDFieldTransformer(t *testing.T) {
- tst
`
u := &unstructured.Unstructured{}
yaml.Unmarshal([]byte(crdYaml), &u.Object)
err := yaml.Unmarshal([]byte(crdYaml), &u.Object)
Expect(err).NotTo(HaveOccurred())
TruncateCRDFieldTransformer("description", 10)(u)

isDscriptionTruncated := CheckNestedFieldLengthWithinLimit(u.Object, 10, "description")
Expand Down

0 comments on commit 545c0d9

Please sign in to comment.