From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [PATCH 3/4] test/emacs: known broken test for matching fcc and sent message
Date: Thu, 20 Jan 2022 08:33:53 -0400 [thread overview]
Message-ID: <20220120123354.3999579-4-david@tethera.net> (raw)
In-Reply-To: <20220120123354.3999579-1-david@tethera.net>
Based on the method outlined by Daniel Kahn Gilmour in
id:87k1zm225v.fsf@fifthhorseman.net. With a delay of 0.2 seconds the
test becomes flaky on my machine. With a 1 second delay it fails
consistently for more than 1600 iterations.
---
test/T350-crypto.sh | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh
index 8dbf8935..209b8a74 100755
--- a/test/T350-crypto.sh
+++ b/test/T350-crypto.sh
@@ -13,16 +13,30 @@ test_description='PGP/MIME signature verification and decryption'
test_require_emacs
add_gnupg_home
-test_begin_subtest "emacs delivery of signed message"
+test_begin_subtest "emacs delivery of signed message via fcc"
test_expect_success \
'emacs_fcc_message \
"test signed message 001" \
"This is a test signed message." \
"(mml-secure-message-sign)"'
+test_begin_subtest "emacs delivery of signed message via fcc and smtp"
+test_subtest_known_broken
+emacs_deliver_message \
+ 'signed message sent via SMTP' \
+ 'This is a test that messages are sent via SMTP' \
+ "(add-hook 'message-send-mail-hook (lambda () (sleep-for 1)))
+ (mml-secure-message-sign)"
+msg_file=$(notmuch search --output=files subject:signed-message-sent-via-SMTP)
+test_expect_equal_message_body sent_message "$msg_file"
+
test_begin_subtest "signed part content-type indexing"
-output=$(notmuch search mimetype:multipart/signed and mimetype:application/pgp-signature | notmuch_search_sanitize)
-test_expect_equal "$output" "thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test signed message 001 (inbox signed)"
+notmuch search mimetype:multipart/signed and mimetype:application/pgp-signature | notmuch_search_sanitize > OUTPUT
+cat <<EOF >EXPECTED
+thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; test signed message 001 (inbox signed)
+thread:XXX 2000-01-01 [1/1] Notmuch Test Suite; signed message sent via SMTP (inbox signed)
+EOF
+test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "signature verification"
output=$(notmuch show --format=json --verify subject:"test signed message 001" \
--
2.34.1
next prev parent reply other threads:[~2022-01-20 12:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 12:33 fix Fcc of signed / encrypted messages David Bremner
2022-01-20 12:33 ` [PATCH 1/4] test/emacs: match mml settings in emacs_{fcc,deliver}_message David Bremner
2022-01-20 12:33 ` [PATCH 2/4] test: define test_expect_equal_message_body David Bremner
2022-01-20 22:16 ` Tomi Ollila
2022-01-22 2:56 ` David Bremner
2022-01-20 12:33 ` David Bremner [this message]
2022-01-20 12:33 ` [PATCH 4/4] emacs: use cached encoded copy for fcc David Bremner
2022-01-26 11:38 ` fix Fcc of signed / encrypted messages David Bremner
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
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220120123354.3999579-4-david@tethera.net \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.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.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
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 read-only IMAP folder(s) and NNTP newsgroup(s).