aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2014-04-20 13:43:37 -0500
committerJunio C Hamano <gitster@pobox.com>2014-04-21 10:41:38 -0700
commit3667a5b67423ff727569628e903146d970b74095 (patch)
tree28b27859b85cc7310010ab6b14a487f3eb5f6de7
parent3994e64d77d644df0f290f8bf5210ff0cb0adde2 (diff)
downloadgit-3667a5b67423ff727569628e903146d970b74095.tar.gz
t5801 (remote-helpers): cleanup environment sets
Commit 512477b (tests: use "env" to run commands with temporary env-var settings) missed some variables in the remote-helpers test. Also standardize these. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t5801-remote-helpers.sh11
1 files changed, 4 insertions, 7 deletions
diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh
index aa3e223cde..a00a660763 100755
--- a/t/t5801-remote-helpers.sh
+++ b/t/t5801-remote-helpers.sh
@@ -212,9 +212,8 @@ test_expect_success 'push update refs failure' '
echo "update fail" >>file &&
git commit -a -m "update fail" &&
git rev-parse --verify testgit/origin/heads/update >expect &&
- GIT_REMOTE_TESTGIT_PUSH_ERROR="non-fast forward" &&
- export GIT_REMOTE_TESTGIT_PUSH_ERROR &&
- test_expect_code 1 git push origin update &&
+ test_expect_code 1 env GIT_REMOTE_TESTGIT_FAILURE="non-fast forward" \
+ git push origin update &&
git rev-parse --verify testgit/origin/heads/update >actual &&
test_cmp expect actual
)
@@ -235,10 +234,8 @@ cmp_marks () {
}
test_expect_success 'proper failure checks for fetching' '
- (GIT_REMOTE_TESTGIT_FAILURE=1 &&
- export GIT_REMOTE_TESTGIT_FAILURE &&
- cd local &&
- test_must_fail git fetch 2> error &&
+ (cd local &&
+ test_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git fetch 2>error &&
cat error &&
grep -q "Error while running fast-import" error
)