Markus Mäkelä 7ce20b75d7 MXS-1220: Extend and fix REST API tests
Fixed a few broken tests and extended the monitor tests.
2017-05-09 15:32:42 +03:00

27 lines
592 B
Bash
Executable File

#!/bin/bash
#
# This script is run after each test block. It kills the MaxScale process
# and cleans up the directories that contain generated files.
#
test -z "$MAXSCALE_DIR" && exit 1
maxscaledir=$MAXSCALE_DIR
for ((i=0;i<10;i++))
do
pkill maxscale || break
sleep 0.5
done
# If it wasn't dead before, now it is
pgrep maxscale && pkill -9 maxscale
rm -r $maxscaledir/lib/maxscale
rm -r $maxscaledir/cache/maxscale
rm -r $maxscaledir/run/maxscale
mkdir -m 0755 -p $maxscaledir/lib/maxscale
mkdir -m 0755 -p $maxscaledir/cache/maxscale
mkdir -m 0755 -p $maxscaledir/run/maxscale