Files
MaxScale/maxscale-system-test/mxs791_base.sh
Timofey Turenko cd732ac14f MXS-2243 System tests brings VMs by themselves (#193)
maxscale-system-test changed in order to control test environment by itself.
Every test checks which machines are running, compare with list of needed machines
and start new VMs is they are missing in the running machines list.
Tests are executiong MDBCI commands, MDBCI executable should be in the PATH
2019-04-02 13:27:34 +03:00

30 lines
837 B
Bash
Executable File

#!/bin/bash
rp=`realpath $0`
export ssl_options="--ssl-cert=$src_dir/ssl-cert/client-cert.pem --ssl-key=$src_dir/ssl-cert/client-key.pem"
res=0
echo "Trying RWSplit"
echo "show tables" | mysql -u$maxscale_user -p$maxscale_password -h ${maxscale_000_network} -P 4006 $ssl_option test
if [ $? != 0 ] ; then
res=1
echo "Can't connect to DB 'test'"
fi
echo "Trying ReadConn master"
echo "show tables" | mysql -u$maxscale_user -p$maxscale_password -h ${maxscale_000_network} -P 4008 $ssl_options test
if [ $? != 0 ] ; then
res=1
echo "Can't connect to DB 'test'"
fi
echo "Trying ReadConn slave"
echo "show tables" | mysql -u$maxscale_user -p$maxscale_password -h ${maxscale_000_network} -P 4009 $ssl_options test
if [ $? != 0 ] ; then
res=1
echo "Can't connect to DB 'test'"
fi
exit $res