aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-02-16 20:08:23 -0400
committerDavid Bremner <david@tethera.net>2021-03-20 07:41:04 -0300
commit5ec6fd4dcfba0c50bcdec56b4ec51c2ccd1f2e92 (patch)
tree87541dc69c10fb92602b6ccaec4857158c1a8c61 /test
parente823d05ae6dc920d4fc9abf774c3d2575d891d7b (diff)
lib/open: check for split configuration when creating database.
The main functionality will be tested when notmuch-new is converted to support split configuration. Here only the somewhat odd case of split mail root which is actually symlinked to the database path is tested.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T055-path-config.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh
index c6920ca9..19a8a4ab 100755
--- a/test/T055-path-config.sh
+++ b/test/T055-path-config.sh
@@ -27,9 +27,17 @@ split_config () {
DATABASE_PATH=$dir
}
+symlink_config () {
+ local dir
+ backup_config
+ dir="$TMP_DIRECTORY/link.$test_count"
+ ln -s $MAIL_DIR $dir
+ notmuch config set database.path $dir
+ notmuch config set database.mail_root $MAIL_DIR
+ unset DATABASE_PATH
+}
-
-for config in traditional split; do
+for config in traditional split symlink; do
# start each set of tests with a known set of messages
add_email_corpus
@@ -41,6 +49,9 @@ for config in traditional split; do
split_config
mv mail/.notmuch/xapian $DATABASE_PATH
;;
+ symlink)
+ symlink_config
+ ;;
esac
test_begin_subtest "count ($config)"