Skip to content

Use best practice package name in test examples#6731

Merged
anderseknert merged 1 commit intoopen-policy-agent:mainfrom
asleire:patch-1
May 3, 2024
Merged

Use best practice package name in test examples#6731
anderseknert merged 1 commit intoopen-policy-agent:mainfrom
asleire:patch-1

Conversation

@asleire
Copy link
Copy Markdown
Contributor

@asleire asleire commented May 3, 2024

Why the changes in this PR are needed?

Best practice according to https://docs.styra.com/regal/rules/testing/test-outside-test-package is to have tests in a package with _test suffix, but this is not documented anywhere.

Updating the examples is an easy way to teach readers the best practice

What are the changes in this PR?

Changes to the example rego test files and output snippets

Notes to assist PR review:

Further comments:

@netlify
Copy link
Copy Markdown

netlify Bot commented May 3, 2024

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit 57dacd1
🔍 Latest deploy log https://app.netlify.com/sites/openpolicyagent/deploys/6634c52229082b0008aa4654
😎 Deploy Preview https://deploy-preview-6731--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Copy Markdown
Member

@anderseknert anderseknert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this! Some suggestions provided, but looks great to me 👍

Comment thread docs/content/policy-testing.md Outdated
Comment thread docs/content/policy-testing.md Outdated
Best practice according to https://docs.styra.com/regal/rules/testing/test-outside-test-package is to have tests in a package with _test suffix, but this is not documented anywhere.

Updating the examples is an easy way to teach readers the best practice

Signed-off-by: Aleksander <Aleksander.Sleire@Signicat.com>
@anderseknert anderseknert merged commit e011f60 into open-policy-agent:main May 3, 2024
@anderseknert
Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants