aboutsummaryrefslogtreecommitdiffstats
path: root/tests/run
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run')
-rwxr-xr-xtests/run5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/run b/tests/run
index 230ca83..eed77df 100755
--- a/tests/run
+++ b/tests/run
@@ -228,13 +228,16 @@ _interimap_cmd() {
}
interimap_init() {
local u="${1-remote}"
- local db="$XDG_DATA_HOME/interimap/$u.db"
+ local db="$XDG_DATA_HOME/interimap/$u.db" st
local cfg="config${u#remote}"
test \! -e "$db" || error "Database already exists" 1
interimap --config "$cfg" || error "Couldn't initialize interimap" 1
test -f "$db" || error "Database is still missing" 1
grep -Fx "Creating new schema in database file $db" <"$STDERR" || error "DB wasn't created" 1
+ if ! st="$(stat -c"%#a" -- "$db")" || [ "$st" != "0600" ]; then
+ error "$db has mode $st != 0600" 1
+ fi
}
doveadm() {
if [ $# -le 2 ] || [ "$1" != "-u" ]; then