diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2022-03-17 13:13:18 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-18 00:42:14 +0300 |
commit | f6db603c7a051d9d0d1ce135673ce77a5b8b7a4c (patch) | |
tree | e396f7a9a3121dee5dec8182a15a319b869342a3 /t/t5541-http-push-smart.sh | |
parent | c39176b1601a2005222c797912281a5a2dad8dcc (diff) |
http tests: use "test_hook" for "smart" and "dumb" http tests
Change the http tests to use "test_hook" insteadd of
"write_script". In both cases we can get rid of sub-shelling. For
"t/t5550-http-fetch-dumb.sh" add a trivial helper which sets up the
hook and calls "update-server-info".
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5541-http-push-smart.sh')
-rwxr-xr-x | t/t5541-http-push-smart.sh | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh index ab4b5cfcd1..2f09ff4fac 100755 --- a/t/t5541-http-push-smart.sh +++ b/t/t5541-http-push-smart.sh @@ -419,10 +419,7 @@ test_expect_success CMDLINE_LIMIT 'push 2000 tags over http' ' ' test_expect_success GPG 'push with post-receive to inspect certificate' ' - ( - cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git && - mkdir -p hooks && - write_script hooks/post-receive <<-\EOF && + test_hook -C "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git post-receive <<-\EOF && # discard the update list cat >/dev/null # record the push certificate @@ -437,8 +434,9 @@ test_expect_success GPG 'push with post-receive to inspect certificate' ' NONCE_STATUS=${GIT_PUSH_CERT_NONCE_STATUS-nononcestatus} NONCE=${GIT_PUSH_CERT_NONCE-nononce} E_O_F - EOF - + EOF + ( + cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git && git config receive.certnonceseed sekrit && git config receive.certnonceslop 30 ) && |