summaryrefslogtreecommitdiff
path: root/t/t5411/test-0027-push-options--porcelain.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-03-17 10:13:17 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-03-17 21:42:14 (GMT)
commitc39176b1601a2005222c797912281a5a2dad8dcc (patch)
tree89c3af9a50bfff768669dc6850686da9b780eccc /t/t5411/test-0027-push-options--porcelain.sh
parent66865d12a0a15276fd525a461e0873bf82d4f246 (diff)
downloadgit-c39176b1601a2005222c797912281a5a2dad8dcc.zip
git-c39176b1601a2005222c797912281a5a2dad8dcc.tar.gz
git-c39176b1601a2005222c797912281a5a2dad8dcc.tar.bz2
proc-receive hook tests: use "test_hook" instead of "write_script"
Change the t5411/*.sh tests to use the test_hook helper instead of "write_script". Unfortunately these tests do the setup and test across different test_expect_success blocks, so we have to use --clobber (implying --setup) for these. Let's change those that can use a quoted here-doc to do so while we're at it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5411/test-0027-push-options--porcelain.sh')
-rw-r--r--t/t5411/test-0027-push-options--porcelain.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t5411/test-0027-push-options--porcelain.sh b/t/t5411/test-0027-push-options--porcelain.sh
index 8fb75a8..768880b 100644
--- a/t/t5411/test-0027-push-options--porcelain.sh
+++ b/t/t5411/test-0027-push-options--porcelain.sh
@@ -1,6 +1,6 @@
test_expect_success "setup proc-receive hook and disable push-options ($PROTOCOL/porcelain)" '
git -C "$upstream" config receive.advertisePushOptions false &&
- write_script "$upstream/hooks/proc-receive" <<-EOF
+ test_hook -C "$upstream" --clobber proc-receive <<-\EOF
printf >&2 "# proc-receive hook\n"
test-tool proc-receive -v \
-r "ok refs/for/main/topic"
@@ -32,7 +32,7 @@ test_expect_success "enable push options ($PROTOCOL/porcelain)" '
'
test_expect_success "setup version=0 for proc-receive hook ($PROTOCOL/porcelain)" '
- write_script "$upstream/hooks/proc-receive" <<-EOF
+ test_hook -C "$upstream" --clobber proc-receive <<-\EOF
printf >&2 "# proc-receive hook\n"
test-tool proc-receive -v \
--version 0 \
@@ -78,7 +78,7 @@ test_expect_success "proc-receive: ignore push-options for version 0 ($PROTOCOL/
'
test_expect_success "restore proc-receive hook ($PROTOCOL/porcelain)" '
- write_script "$upstream/hooks/proc-receive" <<-EOF
+ test_hook -C "$upstream" --clobber proc-receive <<-\EOF
printf >&2 "# proc-receive hook\n"
test-tool proc-receive -v \
-r "ok refs/for/main/topic"