cmd+tester: Parameterized tests (#7366)

Adding the ability to parameterize Rego `test_*` rules, effectively declaring multiple "test cases" within the rule, which is then individually reported (grouped under their parent rule) when running `opa test`.

Fixes: #2176

Signed-off-by: Johan Fylling <johan.dev@fylling.se>
This commit is contained in:
Johan Fylling
2025-02-17 22:08:27 +01:00
committed by GitHub
parent ac4f061823
commit a6fcabbba6
18 changed files with 2173 additions and 341 deletions
+14
View File
@@ -1617,6 +1617,20 @@
"type": "function"
}
},
{
"name": "internal.test_case",
"decl": {
"args": [
{
"dynamic": {
"type": "any"
},
"type": "array"
}
],
"type": "function"
}
},
{
"name": "intersection",
"decl": {