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
This commit is contained in:
Timofey Turenko
2019-04-02 13:27:34 +03:00
committed by GitHub
parent 868ae4456c
commit cd732ac14f
78 changed files with 1506 additions and 1676 deletions

View File

@ -7,14 +7,11 @@ export script_dir="$(dirname $(readlink -f $0))"
. ${script_dir}/set_run_test_variables.sh
export provider=`${mdbci_dir}/mdbci show provider $box --silent 2> /dev/null`
export backend_box=${backend_box:-"centos_7_"$provider}
if [ "$product" == "mysql" ] ; then
export cnf_path=${script_dir}/cnf/mysql56
fi
${mdbci_dir}/mdbci destroy $name
mdbci destroy $name
mkdir -p ${MDBCI_VM_PATH}/$name
export cnf_path="${MDBCI_VM_PATH}/$name/cnf/"
@ -27,22 +24,20 @@ fi
$(<${script_dir}/templates/${template}.json.template)
" 2> /dev/null > ${MDBCI_VM_PATH}/${name}.json
${mdbci_dir}/mdbci --override --template ${MDBCI_VM_PATH}/${name}.json generate $name
mdbci --override --template ${MDBCI_VM_PATH}/${name}.json generate $name
mkdir ${MDBCI_VM_PATH}/$name/cnf
cp -r ${script_dir}/cnf/* ${MDBCI_VM_PATH}/$name/cnf/
echo "running vagrant up $provider"
${mdbci_dir}/mdbci up $name --attempts 3
mdbci up $name --attempts 3 --labels MAXSCALE
if [ $? != 0 ]; then
echo "Error creating configuration"
rm -f ~/vagrant_lock
exit 1
fi
#cp ~/build-scripts/team_keys .
${mdbci_dir}/mdbci public_keys --key ${team_keys} $name
mdbci public_keys --key ${team_keys} $name
rm -f ~/vagrant_lock
exit 0