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

Migrate tests to JUnit5 #347

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

strangelookingnerd
Copy link
Contributor

@strangelookingnerd strangelookingnerd commented Jan 21, 2025

This PR aims to migrate all tests to JUnit5. Changes include:

  • Migrate annotations
  • Migrate assertions
  • Cleanup assertions
  • Remove public visibility of test classes and methods

There is once exception in org.jenkinsci.plugins.configfiles.buildwrapper.ConfigFileBuildWrapperWorkflowTest#withTempFilesAfterRestart that will remain as a JUnit 4 test. Currently I do not see a way to migrate it due to the usage of RestartableJenkinsRule and SemaphoreStep.

I am well aware that this is a quite large changeset however I hope that there is still interest in this PR and it will be reviewd.
If there are any questions, please do not hesitate to ping me.

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

* Migrate annotations
* Migrate assertions
* Cleanup assertions
* Remove public visibility of test classes and methods
@strangelookingnerd
Copy link
Contributor Author

Last failing test will be fixed by jenkinsci/jenkins-test-harness#910

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