-
Notifications
You must be signed in to change notification settings - Fork 725
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
Provide JUnit5 compatible alternative for RoundTripAbstractTest and RestartableJenkinsRule #2623
base: master
Are you sure you want to change the base?
Conversation
35a739c
to
942e4d0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good example of how one can migrate from using RestartableJenkinsRule
to JenkinsRule.restart()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an example of how one can migrate from using RoundTripAbstractTest
to AbstractRoundTripTest
@@ -44,7 +44,9 @@ | |||
* text configured. | |||
* | |||
* @since 1.20 | |||
* @deprecated Consider migrating to JUnit5 and use {@link io.jenkins.plugins.casc.misc.junit.jupiter.AbstractRoundTripTest} instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is optional, but I'd like to make users aware of the alternative.
* logger) that guarantees the config is loaded. Usually a weird text configured. | ||
*/ | ||
@WithJenkins | ||
public abstract class AbstractRoundTripTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used a slightly different name besides a different package to reduce the risk of mix-ups. Not sure if this is the best way, so feedback is welcome.
...-harness/src/main/java/io/jenkins/plugins/casc/misc/junit/jupiter/AbstractRoundTripTest.java
Outdated
Show resolved
Hide resolved
...-harness/src/main/java/io/jenkins/plugins/casc/misc/junit/jupiter/AbstractRoundTripTest.java
Show resolved
Hide resolved
...-harness/src/main/java/io/jenkins/plugins/casc/misc/junit/jupiter/AbstractRoundTripTest.java
Show resolved
Hide resolved
...-harness/src/main/java/io/jenkins/plugins/casc/misc/junit/jupiter/AbstractRoundTripTest.java
Outdated
Show resolved
Hide resolved
22b3768
to
8dc5328
Compare
…estartableJenkinsRule
8dc5328
to
5319f9a
Compare
Now that jenkinsci/jenkins-test-harness#716 is available, it is possible to replace usage of
RestartableJenkinsRule
in most scenarios.This change paves the way to provide a JUnit5-compatible implementation of
RoundTripAbstractTest
that does not rely onRestartableJenkinsRule
anymore.This PR is still a little rough on the edges and therefore created as draft - however feedback is highly appreciated.
Your checklist for this pull request