From: Johan Herland Date: Tue, 11 Aug 2009 10:10:26 GMT Subject: [RFC/PATCH 6/6] Add testcase to verify handling of missing remote helper programs Message-ID: <1249985426-13726-7-git-send-email-johan@herland.net> In-Reply-To: Signed-off-by: Johan Herland --- 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 <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 <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 <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 <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