-
Notifications
You must be signed in to change notification settings - Fork 130
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
Raise default permissions of JUnit5JenkinsRule
#910
Raise default permissions of JUnit5JenkinsRule
#910
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.
Seems sensible, possible to evaluate impact? I guess this could be backported to the default version in PCT or BOM? Or are the numbers so low you could do a quick test?
While many builds in jenkinsci/bom#4324 failed for reasons I can not really explain, there was only a single plugin that had test failures that are related to this change: https://ci.jenkins.io/job/Tools/job/bom/job/PR-4324/4/pipeline-console/?selected-node=9033 Since I'm the maintainer of that plugin this is not really a suprise to me 😄 |
I think to get them to pass you would need to backport this PR to the pre ee9 branch: #906 I don't think JUnit 5 has been adopted very far so lets go for it, we can revert back if required. |
@strangelookingnerd In jenkinsci/bom#4689 I am seeing PCT-only failures of |
@basil Released the plugin as |
Fixes #901
This PR raises the default permissions of
JUnit5JenkinsRule
to align with their JUnit4 counterparts.It is important to notice that this change is breaking and will cause some JUnit5 based plugin tests to fail in case they rely on the fact that the default user / permission is
Unauthenticated
.The alternative would be to leave the permissions as they are but make users aware of the differences in JUnit4 and JUnit5.
Migration
JUnit5 based tests may fail due to this change (as they expect to run in an
Unauthenticated
context) - like for example:To restore the previous behavior tests need to explicitly impersonate an
ANONYMOUS
user like so:Testing done
Added
org.jvnet.hudson.test.JenkinsRulePermissionTest
to validate the behavior.Submitter checklist