Thread (9 messages) flat view 9 messages, 3 authors, 2016-06-15

Re: [JGIT PATCH 3/4] Added test for RefUpdate branch deletion

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:12
Subsystem: the rest · Maintainer: Linus Torvalds

Charles O'Farrell [off-list ref] wrote:
+public class RefUpdateTest extends RepositoryTestCase {
+
+	public void testDeleteHead() throws IOException {
+		final RefUpdate ref = updateRef(Constants.HEAD);
+		delete(ref, Result.NOT_ATTEMPTED, true, false);
+	}
+}
So I see you didn't run the unit tests before emailing.  ;-)

I squashed this into the patch I am replying to:
diff --git a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefUpdateTest.java b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefUpdateTest.java
index 62a60c3..1ade2ef 100644
--- a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefUpdateTest.java
+++ b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/RefUpdateTest.java
@@ -72,7 +72,7 @@ public void testLooseDelete() throws IOException {
 
 	public void testDeleteHead() throws IOException {
 		final RefUpdate ref = updateRef(Constants.HEAD);
-		delete(ref, Result.NOT_ATTEMPTED, true, false);
+		delete(ref, Result.REJECTED_CURRENT_BRANCH, true, false);
 	}
 
 	public void testLogDeleted() throws IOException {
Otherwise the series looks good.  Compiles.  Passes tests.
Tests look correct.  Thanks!

-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help