-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix(cli): make opa test --exit-zero-on-skipped
fail with failing test rules
#6127
fix(cli): make opa test --exit-zero-on-skipped
fail with failing test rules
#6127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fdaguin thanks for this fix. I did some manual tests and the changes look good.
I consider this is a BREAKING-CHANGE: all passing CIs that were launching opa test --exit-zero-on-skipped including both skipped and failed test rules will now break.
Can you please add a note about this in the Change Log so that we can point this out in the next OPA release notes.
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks for your review! I documented this breaking change in 56019a7. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the fix @fdaguin!
56019a7
to
c20e637
Compare
Fixes the failed logic introduced in [1] to compute the exit code of a test run. When used with the option `--exit-zero-on-skipped`, the `opa test` command now returns the exit code 0 only if no failed tests were found. [1]: open-policy-agent@54f203c Fixes: open-policy-agent#6126 BREAKING-CHANGE Signed-off-by: Florian Daguin <[email protected]>
c20e637
to
70eaf52
Compare
@ashutosh-narkar I squashed my commits 🙂 |
Why the changes in this PR are needed?
Closes #6126.
What are the changes in this PR?
Further comments:
I consider this is a BREAKING-CHANGE: all passing CIs that were launching
opa test --exit-zero-on-skipped
including both skipped and failed test rules will now break.