From 75cfa03e163f72e8707e7f9126f17fbacb025b99 Mon Sep 17 00:00:00 2001 From: Shawn Pearce Date: Fri, 1 Nov 2013 15:59:57 +0100 Subject: Use absolute paths for file:// URIs in tests When run under Buck the repository paths may be relative. Request an absolute path to construct the URI, as relative paths are not supported in file:// style URIs. Change-Id: I85470d1db2f4e80cba30f1559c0d99bdfa8ac410 --- .../src/org/eclipse/jgit/ant/tasks/GitCloneTaskTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'org.eclipse.jgit.ant.test/src') diff --git a/org.eclipse.jgit.ant.test/src/org/eclipse/jgit/ant/tasks/GitCloneTaskTest.java b/org.eclipse.jgit.ant.test/src/org/eclipse/jgit/ant/tasks/GitCloneTaskTest.java index 7cd5b74516..3ce0663762 100644 --- a/org.eclipse.jgit.ant.test/src/org/eclipse/jgit/ant/tasks/GitCloneTaskTest.java +++ b/org.eclipse.jgit.ant.test/src/org/eclipse/jgit/ant/tasks/GitCloneTaskTest.java @@ -101,7 +101,7 @@ public class GitCloneTaskTest extends LocalDiskRepositoryTestCase { public void shouldCloneAValidGitRepository() throws Exception { Repository repo = createBareRepository(); File directory = repo.getDirectory(); - task.setUri("file://" + directory); + task.setUri("file://" + directory.getAbsolutePath()); task.execute(); assertTrue(RepositoryCache.FileKey.isGitRepository(new File(dest, ".git"), FS.DETECTED)); @@ -111,7 +111,7 @@ public class GitCloneTaskTest extends LocalDiskRepositoryTestCase { public void shouldCreateABareCloneOfAValidGitRepository() throws Exception { Repository repo = createBareRepository(); File directory = repo.getDirectory(); - task.setUri("file://" + directory); + task.setUri("file://" + directory.getAbsolutePath()); task.setBare(true); task.execute(); -- cgit v1.2.3