From 2fca81f6a3946754d877ba4a468258f0dd78f461 Mon Sep 17 00:00:00 2001 From: Simar Date: Tue, 25 Feb 2025 19:59:22 -0700 Subject: [PATCH] gate assertion --- pkg/policy/policy_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/policy/policy_test.go b/pkg/policy/policy_test.go index 4b447190a..88971e6ca 100644 --- a/pkg/policy/policy_test.go +++ b/pkg/policy/policy_test.go @@ -649,8 +649,9 @@ func TestPolicies_Eval(t *testing.T) { return } g.Expect(err).ToNot(HaveOccurred()) - g.Expect(tc.results).Should(ContainElements(getPolicyResults(checks))) - + if len(tc.results) > 0 { + g.Expect(tc.results).Should(ContainElements(getPolicyResults(checks))) + } }) } }