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>
Felipe Contreras committed
Apr 20, 2014 at 13:43 UTC
3667a5b67423ff727569628e903146d970b74095
1 file changed
+4
-7
t/t5801-remote-helpers.sh
+4
-7
@@ -212,9 +212,8 @@ test_expect_success 'push update refs failure' '
212
echo "update fail" >>file &&
213
git commit -a -m "update fail" &&
214
git rev-parse --verify testgit/origin/heads/update >expect &&
215
- GIT_REMOTE_TESTGIT_PUSH_ERROR="non-fast forward" &&
216
- export GIT_REMOTE_TESTGIT_PUSH_ERROR &&
217
- test_expect_code 1 git push origin update &&
215
+ test_expect_code 1 env GIT_REMOTE_TESTGIT_FAILURE="non-fast forward" \
216
+ git push origin update &&
217
git rev-parse --verify testgit/origin/heads/update >actual &&
218
test_cmp expect actual
219
)
@@ -235,10 +234,8 @@ cmp_marks () {
234
}
235
236
test_expect_success 'proper failure checks for fetching' '
238
- (GIT_REMOTE_TESTGIT_FAILURE=1 &&
239
- export GIT_REMOTE_TESTGIT_FAILURE &&
240
- cd local &&
241
- test_must_fail git fetch 2> error &&
237
+ (cd local &&
238
+ test_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git fetch 2>error &&
239
cat error &&
240
grep -q "Error while running fast-import" error
241
)