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

test(authorization): unit test rego #529

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pflynn-virtru
Copy link
Member

Adds a Go unit test to run the rego policies with various inputs

resolves #501

replaces #503 bad rebase

@pflynn-virtru pflynn-virtru requested a review from a team as a code owner April 5, 2024 18:55
Copy link
Member

Choose a reason for hiding this comment

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

This maybe should be in a subfolder named testdata?

https://stackoverflow.com/a/76674532/23894185

Also naming it -test.rego sourncs like it contains unit tests, maybe a better name would be descriptive like fixtures.rego or samples.rego or something

@dmihalcik-virtru dmihalcik-virtru self-requested a review April 9, 2024 13:47
@pflynn-virtru pflynn-virtru requested a review from a team as a code owner April 15, 2024 17:30
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.

Test framework for OPA Policy Rego files
2 participants