You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The with keyword should be able to mock virtual documents.
Actual Behavior
Queries that iterate over virtual documents are seeing the underlying values generated by rules instead of the mocked value.
Example:
package play
## Reference (working)
q1 = {"a": 1}
p1 = x { q1.a = x }
r1 = q1
test1 {
p1 = x with q1 as {"a": 2} # working
r1 = y with q1 as {"a": 2} # working
}
## Iteration (broken)
q[1]
q[2]
q[3]
p[x] { q[x] }
r = q
test {
p = x with q as {4,5,6} # broken
r = y with q as {4,5,6} # working
}
Tested on
The text was updated successfully, but these errors were encountered:
Previously the implementation was using the ref term that may be
non-ground (which would result in a cache miss.) Also, rename second
return value name to more clearly communicate intent.
Also, fix eval-tree enumeration to support sets that may be returned
by resolver when with keyword has been applied.
Fixesopen-policy-agent#1261
Signed-off-by: Torin Sandall <[email protected]>
Expected Behavior
The with keyword should be able to mock virtual documents.
Actual Behavior
Queries that iterate over virtual documents are seeing the underlying values generated by rules instead of the mocked value.
Example:
Tested on
The text was updated successfully, but these errors were encountered: