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

Refactor PluginTest to eliminate duplication #345

Merged
merged 3 commits into from
Jun 27, 2024

Conversation

Vlatombe
Copy link
Member

@Vlatombe Vlatombe commented Jun 26, 2024

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

  • 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

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

Remove deprecated code
@Vlatombe Vlatombe requested a review from a team as a code owner June 26, 2024 14:57
@Vlatombe Vlatombe changed the title Refactor PluginTest Refactor PluginTest to eliminate duplication Jun 26, 2024
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@            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           

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

@Vlatombe
Copy link
Member Author

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.

@michael-doubez michael-doubez merged commit 329060e into jenkinsci:master Jun 27, 2024
18 checks passed
@Vlatombe Vlatombe deleted the improve-tests branch June 28, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants