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

Use best practice package name in test examples #6731

Merged
merged 1 commit into from
May 3, 2024

Conversation

asleire
Copy link
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:

Copy link

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
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 👍

docs/content/policy-testing.md Outdated Show resolved Hide resolved
docs/content/policy-testing.md Outdated Show resolved Hide resolved
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
28 checks passed
@anderseknert
Copy link
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