Move REST API test scripts into a common directory

Moved and renamed the starting and stopping scripts from the REST API
tests to a common directory. This way the MaxCtrl tests can use the same
scripts to start and stop MaxScale.

Also moved the test configuration file into the `test/` directory and
changed some of the default directory locations.
This commit is contained in:
Markus Mäkelä
2017-07-13 17:09:31 +03:00
parent 173a97ae70
commit 67b2654f50
6 changed files with 17 additions and 16 deletions

24
test/start_maxscale.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
#
# This script is run before each test block. It starts MaxScale and waits for it
# to become responsive.
#
maxscaledir=$MAXSCALE_DIR
test -z "$MAXSCALE_DIR" && exit 1
# Start MaxScale
$maxscaledir/bin/maxscale -df $maxscaledir/maxscale.cnf >& $maxscaledir/maxscale.output &
pid=$!
# Wait for MaxScale to start
for ((i=0;i<60;i++))
do
$maxscaledir/bin/maxadmin help >& /dev/null && break
sleep 0.1
done
# Give MaxScale some time to settle
sleep 1