Skip to content

Commit

Permalink
Merge pull request #961 from MarkEWaite/skip-longpath-test
Browse files Browse the repository at this point in the history
Early exit testHideCredentials if Windows long path
  • Loading branch information
MarkEWaite authored Sep 19, 2020
2 parents f0f2dbb + 5b671d0 commit 0ac02ae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/test/java/hudson/plugins/git/GitSCMTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1716,6 +1716,13 @@ public void testHideCredentials() throws Exception {
descriptor.setHideCredentials(true);
assertTrue("Hide credentials not set", scm.isHideCredentials());

/* Exit test early if running on Windows and path will be too long */
/* Known limitation of git for Windows 2.28.0 and earlier */
/* Needs a longpath fix in git for Windows */
String currentDirectoryPath = new File(".").getCanonicalPath();
if (isWindows() && currentDirectoryPath.length() > 95) {
return;
}

descriptor.setHideCredentials(false);
final String commitFile1 = "commitFile1";
Expand Down

0 comments on commit 0ac02ae

Please sign in to comment.