Merge branch 'ab/fetch-tags-noclobber'
[gitweb.git] / t / t7004-tag.sh
index 93a6694f0e0c45fb7a52abb0b547327636f0f0e6..465eb4ea3f973943367b1c8b2e560d1b16b3c31b 100755 (executable)
@@ -1352,6 +1352,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: