Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2010-09-06 10:57:01 -0400
committerCode Review2010-09-06 10:57:01 -0400
commitb83f08c93ae879c8b6d849a678d60293aad3ee07 (patch)
tree4664f5df3afee448653c7388a9752a3f3b177633 /org.eclipse.egit.core.test
parentb722722de960cc7d96753a1f7bed9aa389d5e8c6 (diff)
parent37f23e1fbfa19c22ae40c8a8469f3cc1b2938e85 (diff)
downloadegit-b83f08c93ae879c8b6d849a678d60293aad3ee07.tar.gz
egit-b83f08c93ae879c8b6d849a678d60293aad3ee07.tar.xz
egit-b83f08c93ae879c8b6d849a678d60293aad3ee07.zip
Merge "Fix IgnoreOperationTest"
Diffstat (limited to 'org.eclipse.egit.core.test')
-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 664335f0a..f6574c83a 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