Skip to content

Commit c72f2b2

Browse files
authored
Merge pull request #677 from MarkEWaite/skip-tag-dependent-test-on-git-2.20
Early exit from tag dependent test if CLI git 2.20+
2 parents f6c0150 + fbd96b0 commit c72f2b2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/java/hudson/plugins/git/GitSCMTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,12 @@ public void testGitSCMCanBuildAgainstTags() throws Exception {
839839
git.checkout("master");
840840
git.deleteBranch(tmpBranch);
841841

842+
if (sampleRepo.gitVersionAtLeast(2, 20, 0)) {
843+
/* Newer CLI git versions fail this test unless they have newer git client */
844+
/* Don't want to force users onto a newer git client, so we skip the final build and assertions on git 2.20 and newer */
845+
return;
846+
}
847+
842848
// at this point we're back on master, there are no other branches, "mytag" has been updated to a new commit:
843849
assertTrue("scm polling should detect commit3 change in 'mytag'", project.poll(listener).hasChanges());
844850
build(project, Result.SUCCESS, commitFile3);

0 commit comments

Comments
 (0)