mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-14 22:26:44 +00:00
Fix minor bugs in server start/kill tests
This commit is contained in:
parent
afd31fe12c
commit
11dcc3e972
@ -387,7 +387,7 @@ start_servald_server() {
|
||||
# - invoke "servald start" command with given args and suitable environment
|
||||
servald_start() {
|
||||
rm -r -f "$instance_dir/cache"
|
||||
mkdir "$instance_dir/cache" || error "mkdir failed"
|
||||
mkdir -p "$instance_dir/cache" || error "mkdir failed"
|
||||
SERVALD_SERVER_CHDIR="$instance_dir" SERVALD_LOG_FILE="$instance_servald_log" $servald start "$@"
|
||||
}
|
||||
|
||||
|
13
tests/server
13
tests/server
@ -130,6 +130,19 @@ test_StartTwice() {
|
||||
doc_RemovePid="Server stops when pid file removed"
|
||||
setup_RemovePid() {
|
||||
setup
|
||||
# Set a watchdog alarm to ensure that the daemon wakes regularly, so the
|
||||
# pidfile is checked quickly, otherwise the daemon will wait 30 seconds
|
||||
# before waking itself to check.
|
||||
>watchdog
|
||||
chmod 0550 watchdog
|
||||
executeOk_servald config \
|
||||
set log.console.level debug \
|
||||
set log.console.show_time true \
|
||||
set log.console.show_pid true \
|
||||
set debug.io true \
|
||||
set debug.watchdog on \
|
||||
set server.watchdog.executable "$PWD/watchdog" \
|
||||
set server.watchdog.interval_ms 100
|
||||
start_servald_server
|
||||
}
|
||||
test_RemovePid() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user