unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: notmuch@notmuchmail.org
Subject: [PATCH v2 01/11] test: fix compact backup / restore test
Date: Sun,  3 Nov 2013 14:24:41 +0200	[thread overview]
Message-ID: <877a8e845940b35ab0ec226b8e0915ed56275611.1383481295.git.jani@nikula.org> (raw)
In-Reply-To: <cover.1383481295.git.jani@nikula.org>
In-Reply-To: <cover.1383481295.git.jani@nikula.org>

From: David Bremner <david@tethera.net>

It was looking in completely the wrong place for the backup and the
(test) xapian database. Unfortunately test_begin_subtest hides the
relevant errors.
---
 test/compact | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/compact b/test/compact
index 5bb5cea..afab537 100755
--- a/test/compact
+++ b/test/compact
@@ -19,10 +19,11 @@ thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)
 thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag1 tag2 unread)
 thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Three (inbox tag3 unread)"
 
-test_begin_subtest "Restoring backup"
-rm -Rf ${TEST_TMPDIR}/mail/xapian
-mv ${TEST_TMPDIR}/mail/xapian.old ${TEST_TMPDIR}/mail/xapian
+test_expect_success 'Restoring Backup' \
+    'rm -Rf ${MAIL_DIR}/.notmuch/xapian &&
+     mv ${MAIL_DIR}/xapian.old ${MAIL_DIR}/.notmuch/xapian'
 
+test_begin_subtest "Checking restored backup"
 output=$(notmuch search \* | notmuch_search_sanitize)
 test_expect_equal "$output" "\
 thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag1 unread)
-- 
1.8.4.rc3

  reply	other threads:[~2013-11-03 12:25 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-03 12:24 [PATCH v2 00/11] compactor changes v2 Jani Nikula
2013-11-03 12:24 ` Jani Nikula [this message]
2013-11-03 12:24 ` [PATCH v2 02/11] lib: construct compactor within try block to catch any exceptions Jani Nikula
2013-11-03 12:24 ` [PATCH v2 03/11] lib: check talloc success in compact Jani Nikula
2013-11-06 21:56   ` David Bremner
2013-11-03 12:24 ` [PATCH v2 04/11] lib: do not leak the database in compaction Jani Nikula
2013-11-03 12:24 ` [PATCH v2 05/11] lib: add closure parameter to compact status update callback Jani Nikula
2013-11-03 12:24 ` [PATCH v2 06/11] lib: update documentation of callback functions for database_compact and database_upgrade Jani Nikula
2013-11-03 12:24 ` [PATCH v2 07/11] lib: use the compaction backup path provided by the caller Jani Nikula
2013-11-05 10:54   ` David Bremner
2013-11-05 11:15     ` Jani Nikula
2013-11-03 12:24 ` [PATCH v2 08/11] cli: return error status if compaction fails Jani Nikula
2013-11-03 12:24 ` [PATCH v2 09/11] cli: add compact --backup=DIRECTORY option, don't backup by default Jani Nikula
2013-11-07 11:07   ` David Bremner
2013-11-03 12:24 ` [PATCH v2 10/11] cli: add compact --verbose option and silence output without it Jani Nikula
2013-11-06 16:38   ` [PATCH 1/2] cli: add compact --quiet option and silence output with it Jani Nikula
2013-11-06 16:38     ` [PATCH 2/2] man: document notmuch compact --quiet and --backup=DIRECTORY options Jani Nikula
2013-11-07 13:25       ` Tomi Ollila
2013-11-07 23:30     ` [PATCH 1/2] cli: add compact --quiet option and silence output with it David Bremner
2013-11-03 12:24 ` [PATCH v2 11/11] man: document notmuch compact --verbose and --backup=DIRECTORY options Jani Nikula
2013-11-05 11:05 ` [PATCH v2 00/11] compactor changes v2 David Bremner
2013-11-05 18:50   ` Tomi Ollila
2013-11-05 19:26     ` Ben Gamari
2013-11-05 20:14       ` Tomi Ollila
2013-11-05 18:48 ` Ben Gamari

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=877a8e845940b35ab0ec226b8e0915ed56275611.1383481295.git.jani@nikula.org \
    --to=jani@nikula.org \
    --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).