From 11bc085c60f02a873090df4111b1cf2f53210eee Mon Sep 17 00:00:00 2001 From: Steve Moyer Date: Thu, 7 Nov 2024 13:17:22 -0500 Subject: [PATCH] test(policy): update to handel statement returned from Match --- pkg/policy/match_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/policy/match_test.go b/pkg/policy/match_test.go index 582d3dd..6a85512 100644 --- a/pkg/policy/match_test.go +++ b/pkg/policy/match_test.go @@ -932,7 +932,9 @@ func TestInvocationValidationSpecExamples(t *testing.T) { }) require.NoError(t, err) - assert.True(t, pol.Match(argsNode)) + exec, stmt := pol.Match(argsNode) + assert.True(t, exec) + assert.Nil(t, stmt) }) t.Run("fails on recipients (second statement)", func(t *testing.T) { @@ -949,6 +951,8 @@ func TestInvocationValidationSpecExamples(t *testing.T) { }) require.NoError(t, err) - assert.False(t, pol.Match(argsNode)) + exec, stmt := pol.Match(argsNode) + assert.False(t, exec) + assert.NotNil(t, stmt) }) }