summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-07-06 18:14:46 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-07-06 18:14:46 -0700
commitccce1e51e8cbc39e944302c2e34f15ef5cb39fce (patch)
treef6ee634d45f93011c6cd1945cb1468e89eaf1f8d
parentMerge branch 'sb/merge-recursive-code-cleanup' (diff)
parentt5534: fix misleading grep invocation (diff)
downloadtgif-ccce1e51e8cbc39e944302c2e34f15ef5cb39fce.tar.xz
Merge branch 'js/t5534-rev-parse-gives-multi-line-output-fix'
A few tests that tried to verify the contents of push certificates did not use 'git rev-parse' to formulate the line to look for in the certificate correctly. * js/t5534-rev-parse-gives-multi-line-output-fix: t5534: fix misleading grep invocation
-rwxr-xr-xt/t5534-push-signed.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/t/t5534-push-signed.sh b/t/t5534-push-signed.sh
index 5bcb288f5c..464ffdd147 100755
--- a/t/t5534-push-signed.sh
+++ b/t/t5534-push-signed.sh
@@ -119,8 +119,11 @@ test_expect_success GPG 'signed push sends push certificate' '
sed -n -e "s/^nonce /NONCE=/p" -e "/^$/q" dst/push-cert
) >expect &&
- grep "$(git rev-parse noop ff) refs/heads/ff" dst/push-cert &&
- grep "$(git rev-parse noop noff) refs/heads/noff" dst/push-cert &&
+ noop=$(git rev-parse noop) &&
+ ff=$(git rev-parse ff) &&
+ noff=$(git rev-parse noff) &&
+ grep "$noop $ff refs/heads/ff" dst/push-cert &&
+ grep "$noop $noff refs/heads/noff" dst/push-cert &&
test_cmp expect dst/push-cert-status
'
@@ -200,8 +203,11 @@ test_expect_success GPG 'fail without key and heed user.signingkey' '
sed -n -e "s/^nonce /NONCE=/p" -e "/^$/q" dst/push-cert
) >expect &&
- grep "$(git rev-parse noop ff) refs/heads/ff" dst/push-cert &&
- grep "$(git rev-parse noop noff) refs/heads/noff" dst/push-cert &&
+ noop=$(git rev-parse noop) &&
+ ff=$(git rev-parse ff) &&
+ noff=$(git rev-parse noff) &&
+ grep "$noop $ff refs/heads/ff" dst/push-cert &&
+ grep "$noop $noff refs/heads/noff" dst/push-cert &&
test_cmp expect dst/push-cert-status
'