Add proper cluster testing scripts

The scripts start MaxScale processes on two different servers. The support
framework for the tests is in place but the tests themselves still need to
be modified to allow the use of non-localhost addresses.
This commit is contained in:
Markus Mäkelä
2017-10-11 14:59:20 +03:00
parent 9617b55905
commit 47b1004134
6 changed files with 87 additions and 47 deletions

View File

@ -18,49 +18,10 @@ cd MaxScale
git checkout $ref
cd maxctrl
cat <<EOF > start_maxscale.sh
#!/bin/sh
sudo systemctl start maxscale
EOF
cat <<EOF >start_double_maxscale.sh
#!/bin/sh
exit 1
EOF
cat <<EOF >stop_maxscale.sh
#!/bin/sh
sudo systemctl stop maxscale
sudo rm -rf /var/lib/maxscale/*
sudo rm -rf /var/cache/maxscale/*
sudo rm -rf /var/run/maxscale/*
if [ -f /tmp/maxadmin.sock ]
then
sudo rm /tmp/maxadmin.sock
fi
EOF
cat <<EOF >stop_double_maxscale.sh
#!/bin/sh
sudo systemctl stop maxscale
sudo rm -rf /var/lib/maxscale/*
sudo rm -rf /var/cache/maxscale/*
sudo rm -rf /var/run/maxscale/*
if [ -f /tmp/maxadmin.sock ]
then
sudo rm /tmp/maxadmin.sock
fi
EOF
# Create the scripts that start and stop MaxScale
~/maxctrl_scripts.sh
chmod +x *.sh
npm i
# Export the value for --basedir where maxscale binaries are located