summaryrefslogtreecommitdiff
path: root/t/t5510-fetch.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2022-03-30 18:01:11 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-03-30 18:01:11 -0700
commita5bf611cc4f14f062cd74965deafe617048bff05 (patch)
tree47dd4d166bf8dc324a619d591ad03b918a93211a /t/t5510-fetch.sh
parentMerge branch 'jd/prompt-upstream-mark' (diff)
parenthttp tests: use "test_hook" for "smart" and "dumb" http tests (diff)
downloadtgif-a5bf611cc4f14f062cd74965deafe617048bff05.tar.xz
Merge branch 'ab/hook-tests-updates'
Update tests around the use of hook scripts. * ab/hook-tests-updates: http tests: use "test_hook" for "smart" and "dumb" http tests proc-receive hook tests: use "test_hook" instead of "write_script" tests: extend "test_hook" for "rm" and "chmod -x", convert "$HOOK" tests: use "test_hook" for misc "mkdir -p" and "chmod" cases tests: change "mkdir -p && write_script" to use "test_hook" tests: change "cat && chmod +x" to use "test_hook" gc + p4 tests: use "test_hook", remove sub-shells fetch+push tests: use "test_hook" and "test_when_finished" pattern bugreport tests: tighten up "git bugreport -s hooks" test tests: assume the hooks are disabled by default http tests: don't rely on "hook/post-update.sample" hook tests: turn exit code assertions into a loop test-lib-functions: add and use a "test_hook" wrapper
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-xt/t5510-fetch.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 48e14e2dab..6f38a69fbb 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -273,7 +273,7 @@ test_expect_success 'fetch --atomic executes a single reference transaction only
EOF
rm -f atomic/actual &&
- write_script atomic/.git/hooks/reference-transaction <<-\EOF &&
+ test_hook -C atomic reference-transaction <<-\EOF &&
( echo "$*" && cat ) >>actual
EOF
@@ -306,7 +306,7 @@ test_expect_success 'fetch --atomic aborts all reference updates if hook aborts'
EOF
rm -f atomic/actual &&
- write_script atomic/.git/hooks/reference-transaction <<-\EOF &&
+ test_hook -C atomic/.git reference-transaction <<-\EOF &&
( echo "$*" && cat ) >>actual
exit 1
EOF
@@ -334,7 +334,7 @@ test_expect_success 'fetch --atomic --append appends to FETCH_HEAD' '
test_line_count = 2 atomic/.git/FETCH_HEAD &&
cp atomic/.git/FETCH_HEAD expected &&
- write_script atomic/.git/hooks/reference-transaction <<-\EOF &&
+ test_hook -C atomic reference-transaction <<-\EOF &&
exit 1
EOF
@@ -364,7 +364,7 @@ test_expect_success 'fetch --atomic --prune executes a single reference transact
$ZERO_OID $head_oid refs/remotes/origin/new-branch
EOF
- write_script atomic/.git/hooks/reference-transaction <<-\EOF &&
+ test_hook -C atomic reference-transaction <<-\EOF &&
( echo "$*" && cat ) >>actual
EOF