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

Prevent NullPointerException when using API token w/o OIC session #483

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eva-mueller-coremedia
Copy link
Contributor

@eva-mueller-coremedia eva-mueller-coremedia commented Dec 19, 2024

I encountered warnings in my IDE about potential NPEs and fixed them accordingly.

In the course of this small fix, I tried to understand the integration test in PluginTest.java and found it a little bit ... grown.
Thus I made some housekeeping

  • move mock methods to own file
  • move helper methods to own file
  • extracted topic related test from PluginTest.java into own test files

Testing done

This change has solely tested by the integration test in PluginApiTokenTest.java.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@eva-mueller-coremedia eva-mueller-coremedia requested a review from a team as a code owner December 19, 2024 08:10
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 78.94737% with 4 lines in your changes missing coverage. Please review.

Project coverage is 73.05%. Comparing base (84359ac) to head (da564b7).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
...va/org/jenkinsci/plugins/oic/OicSecurityRealm.java 78.94% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #483      +/-   ##
============================================
+ Coverage     71.73%   73.05%   +1.31%     
- Complexity      222      233      +11     
============================================
  Files            17       17              
  Lines          1033     1039       +6     
  Branches        148      147       -1     
============================================
+ Hits            741      759      +18     
+ Misses          201      190      -11     
+ Partials         91       90       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eva-mueller-coremedia
Copy link
Contributor Author

@jtnord @michael-doubez would be great if you could have a look.
Unfortunately, I am not allowed to use @jenkinsci/oic-auth-plugin-developers

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.

1 participant