Files
regorus/tests/interpreter/cases/rule/generic.yaml
Anand Krishnamoorthi edd0ccca5b fix: Issues #302, #303 (#304)
Handle undefined values correctly in ordered-else. Previously an undefined value
in one of the blocks could cause the entire rule to evaluate to undefined.

Handle undefined values correctly in generic rule refs to prevent them from
propagating to output.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2024-08-29 09:47:45 -07:00

27 lines
518 B
YAML

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: undefined components
data: {}
modules:
- |
package test
import rego.v1
principal := input.principal
action := input.action
p[principal][action] := 1 if {
some a in []
}
q[principal][action] contains 1 if {
some a in []
}
query: data.test
want_result:
p: {}
q: {}