summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-07-06 13:38:12 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-07-06 13:38:12 -0700
commited0f7bdec93478e280c9faa2a8ffb13a183cda09 (patch)
tree9cf0d27c9613aacbb38339d009c0e961840d79b1 /t
parentMerge branch 'mg/signature-doc' (diff)
parentgpg-interface: check gpg signature creation status (diff)
downloadtgif-ed0f7bdec93478e280c9faa2a8ffb13a183cda09.tar.xz
Merge branch 'jk/gpg-interface-cleanup'
A new run-command API function pipe_command() is introduced to sanely feed data to the standard input while capturing data from the standard output and the standard error of an external process, which is cumbersome to hand-roll correctly without deadlocking. The codepath to sign data in a prepared buffer with GPG has been updated to use this API to read from the status-fd to check for errors (instead of relying on GPG's exit status). * jk/gpg-interface-cleanup: gpg-interface: check gpg signature creation status sign_buffer: use pipe_command verify_signed_buffer: use pipe_command run-command: add pipe_command helper verify_signed_buffer: use tempfile object verify_signed_buffer: drop pbuf variable gpg-interface: use child_process.args
Diffstat (limited to 't')
-rwxr-xr-xt/t7004-tag.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index f9b7d79af5..8b0f71a2ac 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -1202,10 +1202,17 @@ test_expect_success GPG,RFC1991 \
# try to sign with bad user.signingkey
git config user.signingkey BobTheMouse
test_expect_success GPG \
- 'git tag -s fails if gpg is misconfigured' \
+ 'git tag -s fails if gpg is misconfigured (bad key)' \
'test_must_fail git tag -s -m tail tag-gpg-failure'
git config --unset user.signingkey
+# try to produce invalid signature
+test_expect_success GPG \
+ 'git tag -s fails if gpg is misconfigured (bad signature format)' \
+ 'test_config gpg.program echo &&
+ test_must_fail git tag -s -m tail tag-gpg-failure'
+
+
# try to verify without gpg:
rm -rf gpghome