Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 4baf839

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7b1732c commit 4baf839

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

t/t7510-signed-commit.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ test_expect_success GPG 'create signed commits' '
4343
4444
test_tick && git rebase -f HEAD^^ && git tag sixth-signed HEAD^ &&
4545
git tag seventh-signed
46+
47+
echo 8 >file && test_tick && git commit -a -m eighth -SB7227189 &&
48+
git tag eighth-signed-alt
4649
'
4750

4851
test_expect_success GPG 'show signatures' '
@@ -63,6 +66,16 @@ test_expect_success GPG 'show signatures' '
6366
! grep "BAD signature from" actual &&
6467
echo $commit OK || exit 1
6568
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
6679
)
6780
'
6881

0 commit comments

Comments
 (0)