From: David Bremner Date: Thu, 20 Jan 2022 01:23:30 +0000 (-0400) Subject: test/emacs: known broken test for matching fcc and sent message X-Git-Tag: 0.35_rc0~19 X-Git-Url: https://git.cworth.org/git?p=notmuch;a=commitdiff_plain;h=8179c3d1146b6b19c64200f0617c4a1ba7588569 test/emacs: known broken test for matching fcc and sent message Based on the method outlined by Daniel Kahn Gillmor 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. --- 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 <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" \