git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Herland <johan@herland.net>
To: git@vger.kernel.org
Cc: Johan Herland <johan@herland.net>,
	barkalow@iabervon.org, gitster@pobox.com,
	benji@silverinsanity.com, Johannes.Schindelin@gmx.de
Subject: [RFC/PATCH 6/6] Add testcase to verify handling of missing remote helper programs
Date: Tue, 11 Aug 2009 12:10:26 +0200	[thread overview]
Message-ID: <1249985426-13726-7-git-send-email-johan@herland.net> (raw)
In-Reply-To: <alpine.LNX.2.00.0908101205120.27553@iabervon.org>

Signed-off-by: Johan Herland <johan@herland.net>
---
 t/t5590-remote-helper-missing.sh |   56 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 56 insertions(+), 0 deletions(-)
 create mode 100755 t/t5590-remote-helper-missing.sh

diff --git a/t/t5590-remote-helper-missing.sh b/t/t5590-remote-helper-missing.sh
new file mode 100755
index 0000000..3bc2bc2
--- /dev/null
+++ b/t/t5590-remote-helper-missing.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+test_description='test graceful failure when missing remote helper program'
+. ./test-lib.sh
+
+test_expect_success 'setup repository' '
+	echo content >file &&
+	git add file &&
+	git commit -m one &&
+	git config remote.missing.vcs foo &&
+	git remote add missing2 foo:/nonexisting/path
+'
+
+test_expect_success 'fetch changes from "missing" remote' '
+	cat <<EOF >expect &&
+warning: Could not find remote helper command "git remote-foo". Assuming native remote.
+EOF
+	! git fetch missing >actual 2>&1 &&
+	head -n1 actual >actual.first &&
+	test_cmp expect actual.first
+'
+
+test_expect_success 'fetch changes from "missing2" remote' '
+	cat <<EOF >expect &&
+warning: Could not find remote helper command "git remote-foo". Assuming native remote.
+EOF
+	! git fetch missing2 >actual 2>&1 &&
+	head -n1 actual >actual.first &&
+	test_cmp expect actual.first
+'
+
+test_expect_success 'push changes to "missing" remote' '
+	echo "more content" >>file &&
+	git add file &&
+	git commit -m two &&
+	cat <<EOF >expect &&
+warning: Could not find remote helper command "git remote-foo". Assuming native remote.
+EOF
+	! git push --all missing >actual 2>&1 &&
+	head -n1 actual >actual.first &&
+	test_cmp expect actual.first
+'
+
+test_expect_success 'push changes to "missing2" remote' '
+	echo "even more content" >>file &&
+	git add file &&
+	git commit -m three &&
+	cat <<EOF >expect &&
+warning: Could not find remote helper command "git remote-foo". Assuming native remote.
+EOF
+	! git push --all missing2 >actual 2>&1 &&
+	head -n1 actual >actual.first &&
+	test_cmp expect actual.first
+'
+
+test_done
-- 
1.6.4.rc3.138.ga6b98.dirty

  parent reply	other threads:[~2009-08-11 13:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-09 19:28 [PATCH 5/8] Add a config option for remotes to specify a foreign vcs Daniel Barkalow
2009-08-09 20:38 ` Johannes Schindelin
2009-08-10  1:15 ` Junio C Hamano
2009-08-10  4:30   ` Daniel Barkalow
2009-08-10  8:32     ` Johan Herland
2009-08-10 19:30       ` Daniel Barkalow
2009-08-11 10:10         ` [RFC/PATCH 0/6] Graceful handling of missing remote helpers Johan Herland
2009-08-11 10:10         ` [RFC/PATCH 1/6] Minor unrelated fixes Johan Herland
2009-08-11 10:10         ` [RFC/PATCH 2/6] transport_get(): Don't SEGFAULT on missing url Johan Herland
2009-08-12 22:24           ` Junio C Hamano
2009-08-12 23:39             ` Johan Herland
2009-08-11 10:10         ` [RFC/PATCH 3/6] Move setup of curl remote helper from transport.c to transport-helper.c Johan Herland
2009-08-11 12:23           ` Johannes Schindelin
2009-08-11 10:10         ` [RFC/PATCH 4/6] Add is_git_command_or_alias() for checking availability of a given git command Johan Herland
2009-08-11 12:21           ` Johannes Schindelin
2009-08-11 10:10         ` [RFC/PATCH 5/6] Let transport_helper_init() decide if a remote helper program can be used Johan Herland
2009-08-11 12:21           ` Johannes Schindelin
2009-08-11 23:28           ` Daniel Barkalow
2009-08-12  7:46             ` Jeff King
2009-08-12 16:21               ` Daniel Barkalow
2009-08-11 10:10         ` Johan Herland [this message]
2009-08-11  5:12       ` [PATCH 5/8] Add a config option for remotes to specify a foreign vcs Junio C Hamano
2009-08-11  8:39         ` Johannes Schindelin
2009-08-10  8:47     ` Junio C Hamano
2009-08-11 15:31   ` Bert Wesarg
2009-08-11 16:20     ` Johannes Schindelin
2009-08-11 21:48       ` Jeff King
     [not found]         ` <20090812075914.6117@nanako3.lavabit.com>
2009-08-11 23:02           ` Jeff King
2009-08-12  0:14             ` Johannes Schindelin
2009-08-12  3:26               ` Junio C Hamano
2009-08-11 23:53         ` Johannes Schindelin
2009-08-12  7:45           ` Jeff King
2009-08-12  9:33             ` Jakub Narebski
2009-08-12 20:30               ` Junio C Hamano
2009-08-13 22:00                 ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1249985426-13726-7-git-send-email-johan@herland.net \
    --to=johan@herland.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=barkalow@iabervon.org \
    --cc=benji@silverinsanity.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).