jenkinsci / oic-auth-plugin

A Jenkins plugin which lets you login to Jenkins using your own, self-hosted or public openid connect server.
https://plugins.jenkins.io/oic-auth
MIT License
71 stars 88 forks source link

Refactor `PluginTest` to eliminate duplication #345

Closed Vlatombe closed 2 months ago

Vlatombe commented 2 months ago

Eliminate all code duplication, using gson to format json instead of building strings manually.

Remove deprecated code.

Existing tests all pass.

Coverage remains the same, with the test class size divided by 2 (858 lines vs. 1520)

Testing done

Submitter checklist

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 72.46%. Comparing base (bca3705) to head (764be9c). Report is 4 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #345 +/- ## ========================================= Coverage 72.46% 72.46% + Complexity 201 200 -1 ========================================= Files 9 9 Lines 839 839 Branches 119 119 ========================================= Hits 608 608 Misses 170 170 Partials 61 61 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Vlatombe commented 2 months ago

Hi @michael-doubez, do you have time to review this ? Ideally I'd like to get it merged before I can add testing to #344, I don't want to add more duplications.