summaryrefslogtreecommitdiff
path: root/t/t7510-signed-commit.sh
diff options
context:
space:
mode:
authorLibravatar Jiang Xin <worldhello.net@gmail.com>2022-01-17 08:30:45 +0800
committerLibravatar Jiang Xin <worldhello.net@gmail.com>2022-01-17 08:30:45 +0800
commit90999dd6864e63c23fabe2f4263c5e4ed70bd8f5 (patch)
tree65a20b6daeeb4cc9b9c95a4877b7f5745b96c46e /t/t7510-signed-commit.sh
parentl10n: bg.po: Updated Bulgarian translation (5195t) (diff)
parentGit 2.35-rc1 (diff)
downloadtgif-90999dd6864e63c23fabe2f4263c5e4ed70bd8f5.tar.xz
Merge tag 'v2.35.0-rc1'
Git 2.35-rc1 * tag 'v2.35.0-rc1': Git 2.35-rc1 reftable tests: avoid "int" overflow, use "uint64_t" reftable: avoid initializing structs from structs t1450-fsck: exec-bit is not needed to make loose object writable refs API: use "failure_errno", not "errno" Last minute fixes before -rc1 build: NonStop ships with an older zlib packfile: fix off-by-one error in decoding logic t/gpg: simplify test for unknown key branch: missing space fix at line 313 fmt-merge-msg: prevent use-after-free with signed tags cache.h: drop duplicate `ensure_full_index()` declaration lazyload: use correct calling conventions fetch: fix deadlock when cleaning up lockfiles in async signals
Diffstat (limited to 't/t7510-signed-commit.sh')
-rwxr-xr-xt/t7510-signed-commit.sh22
1 files changed, 2 insertions, 20 deletions
diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
index 9882b69ae2..8593b7e3cb 100755
--- a/t/t7510-signed-commit.sh
+++ b/t/t7510-signed-commit.sh
@@ -71,25 +71,7 @@ test_expect_success GPG 'create signed commits' '
git tag eleventh-signed $(cat oid) &&
echo 12 | git commit-tree --gpg-sign=B7227189 HEAD^{tree} >oid &&
test_line_count = 1 oid &&
- git tag twelfth-signed-alt $(cat oid) &&
-
- cat >keydetails <<-\EOF &&
- Key-Type: RSA
- Key-Length: 2048
- Subkey-Type: RSA
- Subkey-Length: 2048
- Name-Real: Unknown User
- Name-Email: unknown@git.com
- Expire-Date: 0
- %no-ask-passphrase
- %no-protection
- EOF
- gpg --batch --gen-key keydetails &&
- echo 13 >file && git commit -a -S"unknown@git.com" -m thirteenth &&
- git tag thirteenth-signed &&
- DELETE_FINGERPRINT=$(gpg -K --with-colons --fingerprint --batch unknown@git.com | grep "^fpr" | head -n 1 | awk -F ":" "{print \$10;}") &&
- gpg --batch --yes --delete-secret-keys $DELETE_FINGERPRINT &&
- gpg --batch --yes --delete-keys unknown@git.com
+ git tag twelfth-signed-alt $(cat oid)
'
test_expect_success GPG 'verify and show signatures' '
@@ -129,7 +111,7 @@ test_expect_success GPG 'verify and show signatures' '
'
test_expect_success GPG 'verify-commit exits failure on unknown signature' '
- test_must_fail git verify-commit thirteenth-signed 2>actual &&
+ test_must_fail env GNUPGHOME="$GNUPGHOME_NOT_USED" git verify-commit initial 2>actual &&
! grep "Good signature from" actual &&
! grep "BAD signature from" actual &&
grep -q -F -e "No public key" -e "public key not found" actual