diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2013-06-16 12:02:14 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2013-08-21 14:44:46 +0200 |
commit | 8a7f4864d8189ddb19fb3f03de686e19e51bd02c (patch) | |
tree | 45ce049edc2b4ea072bcce77ef90dfc560dae0f2 /org.eclipse.jgit.test | |
parent | 423f7227cdd5f4ff9607daf063d15c2b290aa5b8 (diff) | |
download | jgit-8a7f4864d8189ddb19fb3f03de686e19e51bd02c.tar.gz jgit-8a7f4864d8189ddb19fb3f03de686e19e51bd02c.zip |
Fix tests for OS X when the tmpdir is the default /tmp
/tmp is a symbolic link and some tests break when the path
gets canonicalized by JGit or Jetty. Allow Jetty to serve
symlinks by setting init parameter "aliases" to true [1].
[1] http://wiki.eclipse.org/Jetty/Howto/How_to_serve_symbolically_linked_files
Change-Id: I45359a40435e8a33def6e0bb6784b4d8637793ac
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java index 0655415a9d..efdcfeb472 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderTest.java @@ -148,7 +148,10 @@ public class FileRepositoryBuilderTest extends LocalDiskRepositoryTestCase { builder.setMustExist(true); Repository repo2 = builder.build(); - assertEquals(repo1.getDirectory(), repo2.getDirectory()); + // The tmp directory may be a symlink so the actual path + // may not + assertEquals(repo1.getDirectory().getCanonicalPath(), repo2 + .getDirectory().getCanonicalPath()); assertEquals(dir, repo2.getWorkTree()); } @@ -168,7 +171,9 @@ public class FileRepositoryBuilderTest extends LocalDiskRepositoryTestCase { builder.setMustExist(true); Repository repo2 = builder.build(); - assertEquals(repo1.getDirectory(), repo2.getDirectory()); + // The tmp directory may be a symlink + assertEquals(repo1.getDirectory().getCanonicalPath(), repo2 + .getDirectory().getCanonicalPath()); assertEquals(dir, repo2.getWorkTree()); } } |