From 2cfa0dab7fc76f7c9401381c48fc9621d430314e Mon Sep 17 00:00:00 2001 From: Felix Bartels <1257835+fbartels@users.noreply.github.com> Date: Sun, 3 Nov 2019 21:44:29 +0100 Subject: [PATCH] Check at startup if a given store exists (#275) * add check to see if a store exists --- scheduler/commander.yaml | 8 +++++++- tests/startup-test/test.sh | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/scheduler/commander.yaml b/scheduler/commander.yaml index fe9cf83..d588f2c 100644 --- a/scheduler/commander.yaml +++ b/scheduler/commander.yaml @@ -6,8 +6,14 @@ tests: contains: - "Inbox" - "Drafts" + check if store exists: + command: "docker exec kopano_server kopano-admin --details user10" + exit-code: 0 + stdout: + not-contains: + - "WARNING: Unable to get user store entry id. User possibly has no store." check mailbox language german: # this needs a running kopano-server can can therefore not be executed in that container directly - command: "docker exec kopano-storeadm -D user 11; docker exec kopano_server kopano-storeadm -C -l de_DE -n user11; docker exec kopano_server show-folders.py --user user11" + command: "docker exec kopano_server kopano-storeadm -D user 11; docker exec kopano_server kopano-storeadm -C -l de_DE -n user11; docker exec kopano_server show-folders.py --user user11" exit-code: 0 stdout: not-contains: diff --git a/tests/startup-test/test.sh b/tests/startup-test/test.sh index 93b8c5f..4083939 100755 --- a/tests/startup-test/test.sh +++ b/tests/startup-test/test.sh @@ -31,3 +31,6 @@ docker exec kopano_server kopano-cli --list-users docker exec kopano_server kopano-admin -l docker exec kopano_zpush z-push-admin -a list docker exec kopano_zpush z-push-gabsync -a sync + +# will print nothing if store exists and fail if it doen't +docker exec kopano_server kopano-admin --details user1 | grep -q "^Store GUID:"