summaryrefslogtreecommitdiff
path: root/t/t7510-signed-commit.sh
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2015-06-21 23:14:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-06-22 21:20:46 (GMT)
commit8e98e5f27aba812c0f095b7e546871e14a4139f6 (patch)
tree591eb190a18dd5be9e3c21cabf02cce14d2dda97 /t/t7510-signed-commit.sh
parenta4cc18f2934b8d2f00c7c3e11107acb6bfafe2c6 (diff)
downloadgit-8e98e5f27aba812c0f095b7e546871e14a4139f6.zip
git-8e98e5f27aba812c0f095b7e546871e14a4139f6.tar.gz
git-8e98e5f27aba812c0f095b7e546871e14a4139f6.tar.bz2
verify-commit: add test for exit status on untrusted signature
verify-tag exits successfully if the signature is good but the key is untrusted. verify-commit exits unsuccessfully. This divergence in behavior is unexpected and unwanted. Since verify-tag existed earlier, add a failing test to have verify-commit share verify-tag's behavior. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7510-signed-commit.sh')
-rwxr-xr-xt/t7510-signed-commit.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
index 13331e5..4fc376e 100755
--- a/t/t7510-signed-commit.sh
+++ b/t/t7510-signed-commit.sh
@@ -81,6 +81,13 @@ test_expect_success GPG 'verify and show signatures' '
)
'
+test_expect_failure GPG 'verify-commit exits success on untrusted signature' '
+ git verify-commit eighth-signed-alt 2>actual &&
+ grep "Good signature from" actual &&
+ ! grep "BAD signature from" actual &&
+ grep "not certified" actual
+'
+
test_expect_success GPG 'show signed commit with signature' '
git show -s initial >commit &&
git show -s --show-signature initial >show &&