From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [Patch v5 6/6] test: verify tag backup generated by database upgrade
Date: Tue, 1 Apr 2014 22:16:21 -0300 [thread overview]
Message-ID: <1396401381-18128-7-git-send-email-david@tethera.net> (raw)
In-Reply-To: <1396401381-18128-1-git-send-email-david@tethera.net>
'pre upgrade dump' is not much of a test, but at least this way we get
somewhat sensible behaviour if it fails.
---
test/T530-upgrade.sh | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/test/T530-upgrade.sh b/test/T530-upgrade.sh
index d46e3d1..7a68ddf 100755
--- a/test/T530-upgrade.sh
+++ b/test/T530-upgrade.sh
@@ -25,6 +25,8 @@ test_begin_subtest "path: search does not work with old database version"
output=$(notmuch search path:foo)
test_expect_equal "$output" ""
+test_expect_success 'pre upgrade dump' 'notmuch dump | sort > pre-upgrade-dump'
+
test_begin_subtest "database upgrade from format version 1"
output=$(notmuch new | sed -e 's/^Backing up tags to .*$/Backing up tags to FILENAME/')
test_expect_equal "$output" "\
@@ -34,6 +36,10 @@ Backing up tags to FILENAME
Your notmuch database has now been upgraded to database format version 2.
No new mail."
+test_begin_subtest "tag backup matches pre-upgrade dump"
+gunzip -c ${MAIL_DIR}/.notmuch/backup-*.gz | sort > backup-dump
+test_expect_equal_file pre-upgrade-dump backup-dump
+
test_begin_subtest "folder: no longer matches in the middle of path"
output=$(notmuch search folder:baz)
test_expect_equal "$output" ""
--
1.9.0
next prev parent reply other threads:[~2014-04-02 1:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 1:16 v5 gzip / dump restore David Bremner
2014-04-02 1:16 ` [Patch v5 1/6] dump: support gzipped output David Bremner
2014-04-02 16:50 ` Tomi Ollila
2014-04-02 1:16 ` [Patch v5 2/6] dump: when given output file name, write atomically David Bremner
2014-04-02 1:16 ` [Patch v5 3/6] util: add gz_readline David Bremner
2014-04-02 3:26 ` Austin Clements
2014-04-02 16:43 ` Tomi Ollila
2014-04-02 20:43 ` Austin Clements
2014-04-03 6:03 ` Kim Minh Kaplan
2014-04-03 6:17 ` Kim Minh Kaplan
2014-04-02 1:16 ` [Patch v5 4/6] restore: transparently support gzipped input David Bremner
2014-04-02 2:49 ` Austin Clements
2014-04-02 1:16 ` [Patch v5 5/6] notmuch-new: backup tags before database upgrade David Bremner
2014-04-02 3:35 ` Austin Clements
2014-04-02 1:16 ` David Bremner [this message]
2014-04-02 2:07 ` [Patch v5 2/6] dump: when given output file name, write atomically Austin Clements
2014-04-02 20:55 ` Austin Clements
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=1396401381-18128-7-git-send-email-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).