mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
fix: refine constant-key bracket rule handling
Agent-Logs-Url: https://github.com/microsoft/regorus/sessions/272a971a-ae52-45ae-8cb3-714e747599c4 Co-authored-by: anakrish <35780660+anakrish@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
bec159a580
commit
78f226f957
@@ -341,6 +341,35 @@ cases:
|
||||
result: false
|
||||
reasons: []
|
||||
|
||||
- note: default_rule_with_object_key
|
||||
data: {}
|
||||
input: {}
|
||||
modules:
|
||||
- |
|
||||
package test
|
||||
import rego.v1
|
||||
default config["timeout"] := 30
|
||||
config["timeout"] := input.val if {
|
||||
val := input.val
|
||||
}
|
||||
query: data.test.config.timeout
|
||||
want_result: 30
|
||||
|
||||
- note: default_rule_with_object_key_override
|
||||
data: {}
|
||||
input:
|
||||
val: 60
|
||||
modules:
|
||||
- |
|
||||
package test
|
||||
import rego.v1
|
||||
default config["timeout"] := 30
|
||||
config["timeout"] := input.val if {
|
||||
val := input.val
|
||||
}
|
||||
query: data.test.config.timeout
|
||||
want_result: 60
|
||||
|
||||
- note: default_only_rule_with_package_query
|
||||
data: {}
|
||||
modules:
|
||||
|
||||
Reference in New Issue
Block a user