Skip to content

Commit

Permalink
t5801 (remote-helpers): cleanup environment sets
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed Apr 21, 2014
1 parent 3994e64 commit 3667a5b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions t/t5801-remote-helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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
)
Expand Down

0 comments on commit 3667a5b

Please sign in to comment.