You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed some very odd behavior in jenkinsci/jira-plugin#634 and jenkinsci/config-file-provider-plugin#347 where CredentialsStore#addCredentials would suddenly throw AccessDeniedException3 anonymous is missing the Credentials/Create permission when invoked in a JUnit5 test case whereas there is no issue when doing the same with JUnit4.
which does not seem to be applied in the JUnit5JenkinsRule as well.
However I will need some more time to investigate this further.
Are you interested in contributing a fix?
I would love to. However I'm unsure what the best solution would be:
Option 1
Remove permissions from JenkinsRule to align with JUnit5JenkinsRule -> Will likely cause a lot of tests to fail
Option 2
Add permissions to JUnit5JenkinsRule to align with JenkinsRule -> Will likely cause some tests to fail
The text was updated successfully, but these errors were encountered:
strangelookingnerd
changed the title
JUnit5JenkinsRule fails to invoke CredentialsStore#addCredentialsJUnit5JenkinsRule and JenkinsRule have different default permissions
Jan 21, 2025
I noticed some very odd behavior in jenkinsci/jira-plugin#634 and jenkinsci/config-file-provider-plugin#347 where
CredentialsStore#addCredentials
would suddenly throwAccessDeniedException3 anonymous is missing the Credentials/Create permission
when invoked in a JUnit5 test case whereas there is no issue when doing the same with JUnit4.Reproduction steps
Expected Results
Permissions of JUnit4
JenkinsRule
andJUnit5JenkinsRule
should be identical.Actual Results
Permissions are different.
Anything else?
I think I found a potential culprit in
jenkins-test-harness/src/main/java/org/jvnet/hudson/test/JenkinsRule.java
Line 657 in 446201c
JUnit5JenkinsRule
as well.However I will need some more time to investigate this further.
Are you interested in contributing a fix?
I would love to. However I'm unsure what the best solution would be:
Option 1
Remove permissions from
JenkinsRule
to align withJUnit5JenkinsRule
-> Will likely cause a lot of tests to failOption 2
Add permissions to
JUnit5JenkinsRule
to align withJenkinsRule
-> Will likely cause some tests to failThe text was updated successfully, but these errors were encountered: