Skip to content

Commit

Permalink
test(policy): update to handel statement returned from Match
Browse files Browse the repository at this point in the history
  • Loading branch information
smoyer64 committed Nov 7, 2024
1 parent a4a8634 commit 11bc085
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/policy/match_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)
})
}

0 comments on commit 11bc085

Please sign in to comment.