]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/fmt-merge-msg: make gpgssh tests more specific
authorFabian Stelzer <fs@gigacodes.de>
Thu, 9 Dec 2021 08:52:42 +0000 (09:52 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 9 Dec 2021 21:38:04 +0000 (13:38 -0800)
Some GPGSSH fmt-merge-msg tests were only grepping for failed/successful
signature validation and not checking for the tag in the resulting merge
message. Add the missing grep for it.

Signed-off-by: Fabian Stelzer <fs@gigacodes.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6200-fmt-merge-msg.sh

index cc68bba064b3cbd5396eaa1aac253fff2fcb6437..eb2a9a4a78471dc7298260392e99138dbe2a768c 100755 (executable)
@@ -124,6 +124,7 @@ test_expect_success GPGSSH 'message for merging local tag signed by good ssh key
        git checkout main &&
        git fetch . signed-good-ssh-tag &&
        git fmt-merge-msg <.git/FETCH_HEAD >actual &&
+       grep "^Merge tag ${apos}signed-good-ssh-tag${apos}" actual &&
        grep "${GPGSSH_GOOD_SIGNATURE_TRUSTED}" actual &&
        ! grep "${GPGSSH_BAD_SIGNATURE}" actual
 '
@@ -133,6 +134,7 @@ test_expect_success GPGSSH 'message for merging local tag signed by unknown ssh
        git checkout main &&
        git fetch . signed-untrusted-ssh-tag &&
        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