Re: [PATCH] Fix http-push test

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Fix http-push test

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:54

Mike Hommey [off-list ref] writes:
On Mon, Jul 07, 2008 at 09:02:37PM +0200, Mike Hommey wrote:
quoted
http-push test has been broken by 4a7aaccd adding a space character
in the place where the test is being run.
---

 Note that the 4th test doesn't pass because of the new git clone, that
 creates the clone with packed-refs instead of refs/heads/master that
 push is requiring. But this also means push was already broken with
 repositories with packed-refs.
Actually, the 3rd is failing too, but fails to report an error because
git push returns no error code in cases where it says:
  No refs in common and none specified; doing nothing.
Ok, when you are done checking, care to send in a replacement patch with
failing one marked with test_expect_failure?

You do not have to hurry, I am currently at day job and already deep in
today's integration cycle during the lunchtime, and won't be able to queue
new fixes for several hours from now, so your patch will be part of
tomorrow's or tonight's cycle anyway.

Re: [PATCH] Fix http-push test

From: Mike Hommey <hidden>
Date: 2016-06-15 22:44:54

On Mon, Jul 07, 2008 at 12:54:41PM -0700, Junio C Hamano wrote:
Mike Hommey [off-list ref] writes:
quoted
On Mon, Jul 07, 2008 at 09:02:37PM +0200, Mike Hommey wrote:
quoted
http-push test has been broken by 4a7aaccd adding a space character
in the place where the test is being run.
---

 Note that the 4th test doesn't pass because of the new git clone, that
 creates the clone with packed-refs instead of refs/heads/master that
 push is requiring. But this also means push was already broken with
 repositories with packed-refs.
Actually, the 3rd is failing too, but fails to report an error because
git push returns no error code in cases where it says:
  No refs in common and none specified; doing nothing.
Ok, when you are done checking, care to send in a replacement patch with
failing one marked with test_expect_failure?
Shouldn't that be two different patches ? One to fix the spaces problem
and one to handle the fact that builtin-clone broke the tests ?

Mike

[PATCH] Catch failures from t5540-http-push

From: Mike Hommey <hidden>
Date: 2016-06-15 22:44:54

git http-push doesn't handle packed-refs, and now the new builtin-clone
created packed refs, the http-push test fails.

Mark the current failure as such, and also catch third test's failure
that went unreported because git push doesn't return an error code when
it says:
 No refs in common and none specified; doing nothing.
Which it does when http-push can't get a list of refs recursively from
$URL/refs/.

Signed-off-by: Mike Hommey <redacted>
---

 Feel free to squash this in the previous one, if you feel it's better.

 t/t5540-http-push.sh |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/t/t5540-http-push.sh b/t/t5540-http-push.sh
index 147ff98..21dbb55 100755
--- a/t/t5540-http-push.sh
+++ b/t/t5540-http-push.sh
@@ -51,16 +51,17 @@ test_expect_success 'clone remote repository' '
 	git clone $HTTPD_URL/test_repo.git test_repo_clone
 '
 
-test_expect_success 'push to remote repository' '
+test_expect_failure 'push to remote repository' '
 	cd "$ROOT_PATH"/test_repo_clone &&
 	: >path2 &&
 	git add path2 &&
 	test_tick &&
 	git commit -m path2 &&
-	git push
+	git push &&
+	[ -f "$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git/refs/heads/master" ]
 '
 
-test_expect_success 'create and delete remote branch' '
+test_expect_failure 'create and delete remote branch' '
 	cd "$ROOT_PATH"/test_repo_clone &&
 	git checkout -b dev &&
 	: >path3 &&
-- 
1.5.6.GIT
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help