aboutsummaryrefslogtreecommitdiffstats
path: root/tests/00-db-exclusive
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2019-11-09 03:13:45 +0100
committerGuilhem Moulin <guilhem@fripost.org>2019-11-13 06:23:56 +0100
commit67440844c422ee30b31df9a46a7f99ac0e833add (patch)
tree989381e5b94d5939dafdd1e99c7db2ada95355ec /tests/00-db-exclusive
parentb9da6cc7ecf71026d1023dc3354b820c7518426e (diff)
Refactor and improve test suite.
Diffstat (limited to 'tests/00-db-exclusive')
-rw-r--r--tests/00-db-exclusive/local.conf5
-rw-r--r--tests/00-db-exclusive/remote.conf5
-rw-r--r--tests/00-db-exclusive/run25
3 files changed, 0 insertions, 35 deletions
diff --git a/tests/00-db-exclusive/local.conf b/tests/00-db-exclusive/local.conf
deleted file mode 100644
index 9c838fd..0000000
--- a/tests/00-db-exclusive/local.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-namespace inbox {
- location = maildir:~/inbox:LAYOUT=index
- inbox = yes
- list = yes
-}
diff --git a/tests/00-db-exclusive/remote.conf b/tests/00-db-exclusive/remote.conf
deleted file mode 100644
index 9c838fd..0000000
--- a/tests/00-db-exclusive/remote.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-namespace inbox {
- location = maildir:~/inbox:LAYOUT=index
- inbox = yes
- list = yes
-}
diff --git a/tests/00-db-exclusive/run b/tests/00-db-exclusive/run
deleted file mode 100644
index 1528b3b..0000000
--- a/tests/00-db-exclusive/run
+++ /dev/null
@@ -1,25 +0,0 @@
-# verify that database isn't created in --watch mode
-! interimap --watch=60
-xgrep -E "^DBI connect\(.*\) failed: unable to open database file at " <"$STDERR"
-
-# now create database
-interimap
-
-# start a background process
-interimap --watch=60 & pid=$!
-cleanup() {
- # kill interimap process and its children
- pkill -P "$pid" -TERM || true
- kill -TERM "$pid" || true
- wait
-}
-trap cleanup EXIT INT TERM
-
-sleep .05 # wait a short while so we have time to lock the database (ugly and racy...)
-# verify that subsequent runs fail as we can't acquire the exclusive lock
-! interimap
-
-# line 177 is `$DBH->do("PRAGMA locking_mode = EXCLUSIVE");`
-xgrep -Fx "DBD::SQLite::db do failed: database is locked at ./interimap line 177." <"$STDERR"
-
-# vim: set filetype=sh :