]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7510-signed-commit.sh
Merge branch 'en/fetch-negotiation-default-fix'
[thirdparty/git.git] / t / t7510-signed-commit.sh
index 9882b69ae297000a0f64a05ab6ac0aec9f4ca50c..8593b7e3cb8d9aa0c4badeef4273ed406cecc9ca 100755 (executable)
@@ -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