Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2010-09-06 14:57:01 +0000
committerCode Review2010-09-06 14:57:01 +0000
commitb83f08c93ae879c8b6d849a678d60293aad3ee07 (patch)
tree4664f5df3afee448653c7388a9752a3f3b177633
parentb722722de960cc7d96753a1f7bed9aa389d5e8c6 (diff)
parent37f23e1fbfa19c22ae40c8a8469f3cc1b2938e85 (diff)
downloadegit-b83f08c93ae879c8b6d849a678d60293aad3ee07.tar.gz
egit-b83f08c93ae879c8b6d849a678d60293aad3ee07.tar.xz
egit-b83f08c93ae879c8b6d849a678d60293aad3ee07.zip
Merge "Fix IgnoreOperationTest"
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/IgnoreOperationTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/IgnoreOperationTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/IgnoreOperationTest.java
index 664335f0a3..f6574c83a2 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/IgnoreOperationTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/IgnoreOperationTest.java
@@ -14,6 +14,7 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.io.File;
+import java.io.IOException;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
@@ -42,6 +43,15 @@ public class IgnoreOperationTest extends GitTestCase {
@After
public void tearDown() throws Exception {
testRepository.dispose();
+ // delete gitignore file in workspace folder
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ File rootFile = root.getRawLocation().toFile();
+ File ignoreFile = new File(rootFile, Constants.GITIGNORE_FILENAME);
+ if (ignoreFile.exists()) {
+ if (!ignoreFile.delete())
+ throw new IOException(ignoreFile + " in use or undeletable");
+ assert !ignoreFile.exists();
+ }
super.tearDown();
}

Back to the top