diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2019-08-13 00:26:25 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-08-13 00:26:41 +0200 |
commit | 69ce7fc7fb18ef82200e111344eabd205d45b5cf (patch) | |
tree | 34fd8a16828492cb2a1a4230ae149bdf4ad2409b /org.eclipse.jgit.test/tst/org/eclipse | |
parent | 6ef225c5191f0e0c7ffc621843528568455d72a1 (diff) | |
download | jgit-69ce7fc7fb18ef82200e111344eabd205d45b5cf.tar.gz jgit-69ce7fc7fb18ef82200e111344eabd205d45b5cf.zip |
Ensure FSTest uses MockSystemReader
Tests shall not modify ~/.gitconfig. When running tests with bazel this
test failed since bazel isolates tests in a sandbox.
Change-Id: I7dd092afd14972da58a95eb7c200d353f0959fa1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java index 2054e1efa8..3e1202cde8 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSTest.java @@ -65,6 +65,7 @@ import java.util.Set; import java.util.concurrent.TimeUnit; import org.eclipse.jgit.errors.CommandFailedException; +import org.eclipse.jgit.junit.MockSystemReader; import org.eclipse.jgit.junit.RepositoryTestCase; import org.eclipse.jgit.lib.RepositoryCache; import org.junit.After; @@ -77,6 +78,7 @@ public class FSTest { @Before public void setUp() throws Exception { + SystemReader.setInstance(new MockSystemReader()); trash = File.createTempFile("tmp_", ""); trash.delete(); assertTrue("mkdir " + trash, trash.mkdir()); |