summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-12-18 20:26:24 +0100
committerJunio C Hamano <gitster@pobox.com>2012-12-18 20:26:24 +0100
commit086cb911533d6f4233e84c93b08da289ecc8a229 (patch)
treee5f361dc08ed90b4466486e338ab6eaa9fcfb9c2
parentMerge branch 'jk/pickaxe-textconv' into maint (diff)
downloadgit-086cb911533d6f4233e84c93b08da289ecc8a229.tar.xz
git-086cb911533d6f4233e84c93b08da289ecc8a229.zip
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>
-rwxr-xr-xt/t7004-tag.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 5189446534..f5a79b13ae 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -1066,12 +1066,12 @@ test_expect_success GPG \
'
# usage with rfc1991 signatures
-echo "rfc1991" > gpghome/gpg.conf
get_tag_header rfc1991-signed-tag $commit commit $time >expect
echo "RFC1991 signed tag" >>expect
echo '-----BEGIN PGP MESSAGE-----' >>expect
test_expect_success GPG \
'creating a signed tag with rfc1991' '
+ echo "rfc1991" >gpghome/gpg.conf &&
git tag -s -m "RFC1991 signed tag" rfc1991-signed-tag $commit &&
get_tag_msg rfc1991-signed-tag >actual &&
test_cmp expect actual
@@ -1085,6 +1085,7 @@ chmod +x fakeeditor
test_expect_success GPG \
'reediting a signed tag body omits signature' '
+ echo "rfc1991" >gpghome/gpg.conf &&
echo "RFC1991 signed tag" >expect &&
GIT_EDITOR=./fakeeditor git tag -f -s rfc1991-signed-tag $commit &&
test_cmp expect actual
@@ -1092,11 +1093,13 @@ test_expect_success GPG \
test_expect_success GPG \
'verifying rfc1991 signature' '
+ echo "rfc1991" >gpghome/gpg.conf &&
git tag -v rfc1991-signed-tag
'
test_expect_success GPG \
'list tag with rfc1991 signature' '
+ echo "rfc1991" >gpghome/gpg.conf &&
echo "rfc1991-signed-tag RFC1991 signed tag" >expect &&
git tag -l -n1 rfc1991-signed-tag >actual &&
test_cmp expect actual &&