Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs/policy-testing: add missing future.keywords imports #4852

Merged
merged 1 commit into from Jul 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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