From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Fabian Stelzer <fs@gigacodes.de>
Subject: [PATCH v5.1 1/8] t/fmt-merge-msg: make gpg/ssh tests more specific
Date: Wed, 8 Dec 2021 15:43:06 -0800 [thread overview]
Message-ID: <20211208234313.3052303-2-gitster@pobox.com> (raw)
In-Reply-To: <20211208234313.3052303-1-gitster@pobox.com>
From: Fabian Stelzer <fs@gigacodes.de>
All the GPG and GPGSSH tests are redirecing stdout as well as stderr
to `actual` and grep for success/failure over the resulting file.
However, no output is printed on stderr and we do not need to
include it in the grep.
Signed-off-by: Fabian Stelzer <fs@gigacodes.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
t/t6200-fmt-merge-msg.sh | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/t/t6200-fmt-merge-msg.sh b/t/t6200-fmt-merge-msg.sh
index 06c5fb5615..b18ba58745 100755
--- a/t/t6200-fmt-merge-msg.sh
+++ b/t/t6200-fmt-merge-msg.sh
@@ -104,7 +104,7 @@ test_expect_success 'message for merging local branch' '
test_expect_success GPG 'message for merging local tag signed by good key' '
git checkout main &&
git fetch . signed-good-tag &&
- git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
+ git fmt-merge-msg <.git/FETCH_HEAD >actual &&
grep "^Merge tag ${apos}signed-good-tag${apos}" actual &&
grep "^# gpg: Signature made" actual &&
grep "^# gpg: Good signature from" actual
@@ -113,7 +113,7 @@ test_expect_success GPG 'message for merging local tag signed by good key' '
test_expect_success GPG 'message for merging local tag signed by unknown key' '
git checkout main &&
git fetch . signed-good-tag &&
- GNUPGHOME=. git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
+ GNUPGHOME=. git fmt-merge-msg <.git/FETCH_HEAD >actual &&
grep "^Merge tag ${apos}signed-good-tag${apos}" actual &&
grep "^# gpg: Signature made" actual &&
grep -E "^# gpg: Can${apos}t check signature: (public key not found|No public key)" actual
@@ -123,7 +123,7 @@ test_expect_success GPGSSH 'message for merging local tag signed by good ssh key
test_config gpg.ssh.allowedSignersFile "${GPGSSH_ALLOWED_SIGNERS}" &&
git checkout main &&
git fetch . signed-good-ssh-tag &&
- git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
+ git fmt-merge-msg <.git/FETCH_HEAD >actual &&
grep "${GPGSSH_GOOD_SIGNATURE_TRUSTED}" actual &&
! grep "${GPGSSH_BAD_SIGNATURE}" actual
'
@@ -132,7 +132,8 @@ test_expect_success GPGSSH 'message for merging local tag signed by unknown ssh
test_config gpg.ssh.allowedSignersFile "${GPGSSH_ALLOWED_SIGNERS}" &&
git checkout main &&
git fetch . signed-untrusted-ssh-tag &&
- git fmt-merge-msg <.git/FETCH_HEAD >actual 2>&1 &&
+ git fmt-merge-msg <.git/FETCH_HEAD >actual &&
+ grep "^Merge tag ${apos}signed-untrusted-ssh-tag${apos}" actual &&
grep "${GPGSSH_GOOD_SIGNATURE_UNTRUSTED}" actual &&
! grep "${GPGSSH_BAD_SIGNATURE}" actual &&
grep "${GPGSSH_KEY_NOT_TRUSTED}" actual
--
2.34.1-365-gae484d3562
next prev parent reply other threads:[~2021-12-08 23:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 23:43 [PATCH v5.1 0/8] redo ssh-signing-key-lifetime topic Junio C Hamano
2021-12-08 23:43 ` Junio C Hamano [this message]
2021-12-08 23:43 ` [PATCH v5.1 2/8] ssh signing: use sigc struct to pass payload Junio C Hamano
2021-12-08 23:43 ` [PATCH v5.1 3/8] ssh signing: add key lifetime test prereqs Junio C Hamano
2021-12-08 23:43 ` [PATCH v5.1 4/8] ssh signing: make verify-commit consider key lifetime Junio C Hamano
2021-12-08 23:43 ` [PATCH v5.1 5/8] ssh signing: make git log verify " Junio C Hamano
2021-12-08 23:43 ` [PATCH v5.1 6/8] ssh signing: make verify-tag consider " Junio C Hamano
2021-12-08 23:43 ` [PATCH v5.1 7/8] ssh signing: make fmt-merge-msg " Junio C Hamano
2021-12-08 23:43 ` [PATCH v5.1 8/8] ssh signing: verify ssh-keygen in test prereq Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211208234313.3052303-2-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=fs@gigacodes.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).