diff options
author | Shawn Pearce <sop@google.com> | 2013-11-01 15:59:57 +0100 |
---|---|---|
committer | Shawn Pearce <sop@google.com> | 2013-11-01 19:57:47 -0700 |
commit | 75cfa03e163f72e8707e7f9126f17fbacb025b99 (patch) | |
tree | 243fc56c5e6728edab1f6a5afff26cbaa5ae9cda /org.eclipse.jgit.ant.test/src/org/eclipse/jgit | |
parent | 69c1244989e3524c85bc980940c7e6670bc76e11 (diff) | |
download | jgit-75cfa03e163f72e8707e7f9126f17fbacb025b99.tar.gz jgit-75cfa03e163f72e8707e7f9126f17fbacb025b99.zip |
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
Diffstat (limited to 'org.eclipse.jgit.ant.test/src/org/eclipse/jgit')
-rw-r--r-- | org.eclipse.jgit.ant.test/src/org/eclipse/jgit/ant/tasks/GitCloneTaskTest.java | 4 |
1 files changed, 2 insertions, 2 deletions
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(); |