
Some of the scripts assumed that other scripts would be located in the same directory where the current script was executed. Also fixed the SSL connection creation which depended on an obsolete environment variable causing all out-of-source SSL tests to fail.
36 lines
950 B
Bash
Executable File
36 lines
950 B
Bash
Executable File
#!/bin/bash
|
|
|
|
rp=`realpath $0`
|
|
export src_dir=`dirname $rp`
|
|
$PWD/non_native_setup $test_name
|
|
|
|
if [ $? -ne 0 ] ; then
|
|
echo "configuring maxscale failed"
|
|
exit 1
|
|
fi
|
|
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_IP -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_IP -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_IP -P 4009 $ssl_options test
|
|
if [ $? != 0 ] ; then
|
|
res=1
|
|
echo "Can't connect to DB 'test'"
|
|
fi
|
|
|
|
exit $res
|