spring-projects / spring-projects/spring-security
Expose TestOidcUsers and similar to help unit testing in related project
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Expected Behavior
Spring security test cases make extensive use of TestOidcUsers.create() and similar classes.
However, the utility classes are test scope only, so I cannot directly use them for testing in my own projects.
This is pretty annoying. I know I can copy classes from spring-security test-source but it is a temporary workaround which is brittle, as spring-security classes change between releases.
Instead, I would prefer to depend on a test-only package.
- is it possible to create and release a test util package for spring security (or spring-security-oauth2)?
- if yes, what size of effort would it take from the team to make that happen?
is it already possible to achieve what I am trying to do today, then please guide me
Thanks for your understanding 👍
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with oauth2/oauth2-core/src/test/java/org/springframework/security/oauth2/core/oidc/user/TestOidcUsers.java and review TestOidcUsers.create() alongside the similar test utilities mentioned. Determine the scope and packaging requirements for making these utilities usable by external projects; done means a supported test-only dependency path is defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100