Skip to content

Commit

Permalink
Merge pull request #40 from MarkEWaite/prep-for-git-plugin-5.0
Browse files Browse the repository at this point in the history
Adapt test for git plugin 5.0
  • Loading branch information
jglick authored Dec 21, 2022
2 parents c2d0f8b + 01b9885 commit b5627be
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ public class LibraryStepTest {
null, null, Collections.<GitSCMExtension>emptyList())));
s.setChangelog(false);
r.assertEqualDataBoundBeans(s, stepTester.configRoundTrip(s));
snippetizerTester.assertRoundTrip(s, "library changelog: false, identifier: 'foo@master', retriever: legacySCM([$class: 'GitSCM', branches: [[name: '${library.foo.version}']], extensions: [], userRemoteConfigs: [[url: 'https://nowhere.net/']]])");
if (r.jenkins.get().getPlugin("git").getWrapper().getVersion().startsWith("4.")) {
snippetizerTester.assertRoundTrip(s, "library changelog: false, identifier: 'foo@master', retriever: legacySCM([$class: 'GitSCM', branches: [[name: '${library.foo.version}']], extensions: [], userRemoteConfigs: [[url: 'https://nowhere.net/']]])");
} else {
snippetizerTester.assertRoundTrip(s, "library changelog: false, identifier: 'foo@master', retriever: legacySCM(scmGit(branches: [[name: '${library.foo.version}']], extensions: [], userRemoteConfigs: [[url: 'https://nowhere.net/']]))");
}
}

@Test public void vars() throws Exception {
Expand Down

0 comments on commit b5627be

Please sign in to comment.