Merge branch 'jk/banned-function'
[gitweb.git] / t / t7004-tag.sh
index d7b319e919c83ca677737840f70075c173364209..2147938aa1b60d8b67557e0bbe3c0368ef712b69 100755 (executable)
@@ -1354,6 +1354,19 @@ test_expect_success GPG \
        'test_config gpg.program echo &&
         test_must_fail git tag -s -m tail tag-gpg-failure'
 
+# try to sign with bad user.signingkey
+test_expect_success GPGSM \
+       'git tag -s fails if gpgsm is misconfigured (bad key)' \
+       'test_config user.signingkey BobTheMouse &&
+        test_config gpg.format x509 &&
+        test_must_fail git tag -s -m tail tag-gpg-failure'
+
+# try to produce invalid signature
+test_expect_success GPGSM \
+       'git tag -s fails if gpgsm is misconfigured (bad signature format)' \
+       'test_config gpg.x509.program echo &&
+        test_config gpg.format x509 &&
+        test_must_fail git tag -s -m tail tag-gpg-failure'
 
 # try to verify without gpg: