diff options
| author | Jens Baumgart | 2010-09-06 11:09:35 +0000 |
|---|---|---|
| committer | Jens Baumgart | 2010-09-06 11:09:35 +0000 |
| commit | 37f23e1fbfa19c22ae40c8a8469f3cc1b2938e85 (patch) | |
| tree | b49edc41bea9b0de503b6b8b5bd46069c91a29ea | |
| parent | aa7b1ea7ddab6f32d2d6ca0c5d7f5b487ebd4306 (diff) | |
| download | egit-37f23e1fbfa19c22ae40c8a8469f3cc1b2938e85.tar.gz egit-37f23e1fbfa19c22ae40c8a8469f3cc1b2938e85.tar.xz egit-37f23e1fbfa19c22ae40c8a8469f3cc1b2938e85.zip | |
Fix IgnoreOperationTest
IgnoreOperationTest did not clean up .gitignore in the workspace
folder. This caused subsequent test to fail.
Change-Id: Icc3e3e02302a8189ae2009e24682206d8bff086e
Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
| -rw-r--r-- | org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/op/IgnoreOperationTest.java | 10 |
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(); } |
