summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-06-17 00:05:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-06-17 20:41:28 (GMT)
commit4baf839fe0e71dca3f26198b7a4faab439fa2ef6 (patch)
treedd15b5a9313357310ddd0c63629402e4b664aa4b
parent7b1732c11605f84b809bd120401df49866c27141 (diff)
downloadgit-4baf839fe0e71dca3f26198b7a4faab439fa2ef6.zip
git-4baf839fe0e71dca3f26198b7a4faab439fa2ef6.tar.gz
git-4baf839fe0e71dca3f26198b7a4faab439fa2ef6.tar.bz2
t7510: test a commit signed by an unknown key
We tested both good and bad signatures, but not ones made correctly but with a key for which we have no trust. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t7510-signed-commit.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
index cdffcbd..04fc2c5 100755
--- a/t/t7510-signed-commit.sh
+++ b/t/t7510-signed-commit.sh
@@ -43,6 +43,9 @@ test_expect_success GPG 'create signed commits' '
test_tick && git rebase -f HEAD^^ && git tag sixth-signed HEAD^ &&
git tag seventh-signed
+
+ echo 8 >file && test_tick && git commit -a -m eighth -SB7227189 &&
+ git tag eighth-signed-alt
'
test_expect_success GPG 'show signatures' '
@@ -63,6 +66,16 @@ test_expect_success GPG 'show signatures' '
! grep "BAD signature from" actual &&
echo $commit OK || exit 1
done
+ ) &&
+ (
+ for commit in eighth-signed-alt
+ do
+ git show --pretty=short --show-signature $commit >actual &&
+ grep "Good signature from" actual &&
+ ! grep "BAD signature from" actual &&
+ grep "not certified" actual &&
+ echo $commit OK || exit 1
+ done
)
'