summaryrefslogtreecommitdiff
path: root/t/t7030-verify-tag.sh
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2015-06-21 23:14:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-06-22 21:20:47 (GMT)
commite18443ece711564145d545b650851c4615717128 (patch)
tree1908d85b9ea17b6f47014550d05161f244aa0180 /t/t7030-verify-tag.sh
parentaeff29dd4dab01b497b2a2cf73e982e846a5fe4c (diff)
downloadgit-e18443ece711564145d545b650851c4615717128.zip
git-e18443ece711564145d545b650851c4615717128.tar.gz
git-e18443ece711564145d545b650851c4615717128.tar.bz2
verify-tag: add option to print raw gpg status information
verify-tag by default displays human-readable output on standard error. However, it can also be useful to get access to the raw gpg status information, which is machine-readable, allowing automated implementation of signing policy. Add a --raw option to make verify-tag produce the gpg status information on standard error instead of the human-readable format. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7030-verify-tag.sh')
-rwxr-xr-xt/t7030-verify-tag.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/t/t7030-verify-tag.sh b/t/t7030-verify-tag.sh
index 632bc53..4608e71 100755
--- a/t/t7030-verify-tag.sh
+++ b/t/t7030-verify-tag.sh
@@ -81,4 +81,35 @@ test_expect_success GPG 'detect fudged signature' '
! grep "Good signature from" actual1
'
+test_expect_success GPG 'verify signatures with --raw' '
+ (
+ for tag in initial second merge fourth-signed sixth-signed seventh-signed
+ do
+ git verify-tag --raw $tag 2>actual &&
+ grep "GOODSIG" actual &&
+ ! grep "BADSIG" actual &&
+ echo $tag OK || exit 1
+ done
+ ) &&
+ (
+ for tag in fourth-unsigned fifth-unsigned sixth-unsigned
+ do
+ test_must_fail git verify-tag --raw $tag 2>actual &&
+ ! grep "GOODSIG" actual &&
+ ! grep "BADSIG" actual &&
+ echo $tag OK || exit 1
+ done
+ ) &&
+ (
+ for tag in eighth-signed-alt
+ do
+ git verify-tag --raw $tag 2>actual &&
+ grep "GOODSIG" actual &&
+ ! grep "BADSIG" actual &&
+ grep "TRUST_UNDEFINED" actual &&
+ echo $tag OK || exit 1
+ done
+ )
+'
+
test_done