From 0531353ebf54073d0089bbdf7459a526b9a9dc77 Mon Sep 17 00:00:00 2001 From: ayushsatyam146 Date: Fri, 3 May 2024 20:06:02 +0530 Subject: [PATCH] Apply suggestions from code review incoporating review changes Co-authored-by: Adam Kaplan --- pkg/common/util_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/common/util_test.go b/pkg/common/util_test.go index 4a90b8f8..ed2fe40f 100644 --- a/pkg/common/util_test.go +++ b/pkg/common/util_test.go @@ -125,9 +125,10 @@ func TestTruncateCRDFieldTransformer(t *testing.T) { err = yaml.Unmarshal(testData, u) Expect(err).NotTo(HaveOccurred()) - TruncateCRDFieldTransformer("description", 10)(u) - isDscriptionTruncated := CheckNestedFieldLengthWithinLimit(u.Object, 10, "description") - Expect(isDscriptionTruncated).To(Equal(true)) + transformFunc := TruncateCRDFieldTransformer("description", 10) + transformFunc(u) + isDescriptionTruncated := CheckNestedFieldLengthWithinLimit(u.Object, 10, "description") + Expect(isDescriptionTruncated).To(Equal(true)) }) }