test(policy): update to handel statement returned from Match

This commit is contained in:
Steve Moyer
2024-11-07 13:17:22 -05:00
parent a4a8634eb8
commit 11bc085c60

View File

@@ -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)
})
}