Skip to content

Commit

Permalink
docs/policy-testing: add missing future.keywords imports (#4852)
Browse files Browse the repository at this point in the history
Fixes #4849.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
(cherry picked from commit f9945ee)
  • Loading branch information
srenatus committed Jul 8, 2022
1 parent fa6ccbc commit 22641e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/content/policy-testing.md
Expand Up @@ -54,6 +54,7 @@ To test this policy, we will create a separate Rego file that contains test case

```live:example/test:module:read_only
package authz
import future.keywords
test_post_allowed if {
allow with input as {"path": ["users"], "method": "POST"}
Expand Down Expand Up @@ -124,6 +125,7 @@ name is prefixed with `test_`.

```live:example_format:module:read_only
package mypackage
import future.keywords
test_some_descriptive_name if {
# test logic
Expand Down Expand Up @@ -155,6 +157,7 @@ by zero condition) the test result is marked as an `ERROR`. Tests prefixed with

```live:example_results:module:read_only
package example
import future.keywords
# This test will pass.
test_ok if true
Expand Down

0 comments on commit 22641e5

Please sign in to comment.