t7004: do not create unneeded gpghome/gpg.conf when GPG is not used
These tests themselves are properly protected by the GPG prerequisite, but one of the set-up steps outside the test_expect_success block unconditionally assumed that there is a gpghome/ directory, which is not true if GPG is not being used. It may be a good idea to move the whole set-up steps in the test but that is a follow-up topic. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Dec 18, 2012 at 11:26 UTC
086cb911533d6f4233e84c93b08da289ecc8a229
1 file changed
+4
-1
t/t7004-tag.sh
+4
-1
@@ -1066,12 +1066,12 @@ test_expect_success GPG \
1066
'
1067
1068
# usage with rfc1991 signatures
1069
-echo "rfc1991" > gpghome/gpg.conf
1069
get_tag_header rfc1991-signed-tag $commit commit $time >expect
1070
echo "RFC1991 signed tag" >>expect
1071
echo '-----BEGIN PGP MESSAGE-----' >>expect
1072
test_expect_success GPG \
1073
'creating a signed tag with rfc1991' '
1074
+ echo "rfc1991" >gpghome/gpg.conf &&
1075
git tag -s -m "RFC1991 signed tag" rfc1991-signed-tag $commit &&
1076
get_tag_msg rfc1991-signed-tag >actual &&
1077
test_cmp expect actual
@@ -1085,6 +1085,7 @@ chmod +x fakeeditor
1085
1086
test_expect_success GPG \
1087
'reediting a signed tag body omits signature' '
1088
+ echo "rfc1991" >gpghome/gpg.conf &&
1089
echo "RFC1991 signed tag" >expect &&
1090
GIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&
1091
test_cmp expect actual
@@ -1092,11 +1093,13 @@ test_expect_success GPG \
1093
1094
test_expect_success GPG \
1095
'verifying rfc1991 signature' '
1096
+ echo "rfc1991" >gpghome/gpg.conf &&
1097
git tag -v rfc1991-signed-tag
1098
'
1099
1100
test_expect_success GPG \
1101
'list tag with rfc1991 signature' '
1102
+ echo "rfc1991" >gpghome/gpg.conf &&
1103
echo "rfc1991-signed-tag RFC1991 signed tag" >expect &&
1104
git tag -l -n1 rfc1991-signed-tag >actual &&
1105
test_cmp expect actual &&