From: David Bremner <david@tethera.net>
To: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,
Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH v2 5/5] cli/show: enable --decrypt=stash
Date: Tue, 01 May 2018 22:58:16 -0300 [thread overview]
Message-ID: <87d0yeg6o7.fsf@tethera.net> (raw)
In-Reply-To: <20180110001228.2211-6-dkg@fifthhorseman.net>
Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:
> +
> + Note: ``--decrypt=stash`` requires a writable database.
> + Otherwise, ``notmuch show`` operates entirely in read-only mode.
I would rephrase this as "requires write access to the database";
otherwise it sounds like "writable" (or lack) is persistent property of
databases.
> +# show the message using stashing decryption
> +test_begin_subtest "stash decryption during show"
> +output=$(notmuch show --decrypt=stash tag:encrypted subject:002 | awk '/^\014part}/{ f=0 }; { if (f) { print $0 } } /^\014part{ ID: 3/{ f=1 }')
> +expected='This is a test encrypted message with a wumpus.'
> +test_expect_equal \
> + "$output" \
> + "$expected"
> +
This is a bit hard to follow. I think it would be better to isolate this
kind of parsing in a function in test-lib.sh; then at least the name
would suggest the intent.
> +test_begin_subtest "search should now show the contents"
I think the point is not that it _shows_ the contents, but that it finds
them
> +output=$(notmuch search wumpus)
> +expected='thread:0000000000000003 2000-01-01 [1/1] Notmuch Test Suite; test encrypted message for cleartext index 002 (encrypted inbox unread)'
> +if [ $NOTMUCH_HAVE_GMIME_SESSION_KEYS -eq 0 ]; then
> + test_subtest_known_broken
> +fi
> +test_expect_equal \
> + "$output" \
> + "$expected"
next prev parent reply other threads:[~2018-05-02 1:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 0:12 notmuch show --decrypt=stash Daniel Kahn Gillmor
2018-01-10 0:12 ` [PATCH v2 1/5] lib: expose notmuch_message_get_database() Daniel Kahn Gillmor
2018-01-10 0:12 ` [PATCH v2 2/5] properties: add notmuch_message_count_properties Daniel Kahn Gillmor
2018-01-10 0:12 ` [PATCH v2 3/5] cli: write session keys to database, if asked to do so Daniel Kahn Gillmor
2018-05-02 1:42 ` David Bremner
2018-01-10 0:12 ` [PATCH v2 4/5] cli/show: reindex when we learned new session keys about a message Daniel Kahn Gillmor
2018-05-02 1:36 ` David Bremner
2018-05-09 18:42 ` Daniel Kahn Gillmor
2018-05-11 7:04 ` Daniel Kahn Gillmor
2018-01-10 0:12 ` [PATCH v2 5/5] cli/show: enable --decrypt=stash Daniel Kahn Gillmor
2018-05-02 1:58 ` David Bremner [this message]
2018-04-29 8:49 ` notmuch show --decrypt=stash Daniel Kahn Gillmor
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=87d0yeg6o7.fsf@tethera.net \
--to=david@tethera.net \
--cc=dkg@fifthhorseman.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).