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>

Jeff King committed Jun 16, 2014 at 20:05 UTC 4baf839fe0e71dca3f26198b7a4faab439fa2ef6
1 file changed +13
t/t7510-signed-commit.sh
+13
@@ -43,6 +43,9 @@ test_expect_success GPG 'create signed commits' '
43
44 test_tick && git rebase -f HEAD^^ && git tag sixth-signed HEAD^ &&
45 git tag seventh-signed
46 +
47 + echo 8 >file && test_tick && git commit -a -m eighth -SB7227189 &&
48 + git tag eighth-signed-alt
49 '
50
51 test_expect_success GPG 'show signatures' '
@@ -63,6 +66,16 @@ test_expect_success GPG 'show signatures' '
66 ! grep "BAD signature from" actual &&
67 echo $commit OK || exit 1
68 done
69 + ) &&
70 + (
71 + for commit in eighth-signed-alt
72 + do
73 + git show --pretty=short --show-signature $commit >actual &&
74 + grep "Good signature from" actual &&
75 + ! grep "BAD signature from" actual &&
76 + grep "not certified" actual &&
77 + echo $commit OK || exit 1
78 + done
79 )
80 '
81