
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
44 lines
970 B
Bash
Executable File
44 lines
970 B
Bash
Executable File
#!/bin/bash
|
|
set -x
|
|
export dir=`pwd`
|
|
|
|
# read the name of build scripts directory
|
|
export script_dir="$(dirname $(readlink -f $0))"
|
|
|
|
. ${script_dir}/set_run_test_variables.sh
|
|
|
|
if [ "$product" == "mysql" ] ; then
|
|
export cnf_path=${script_dir}/cnf/mysql56
|
|
fi
|
|
|
|
mdbci destroy $name
|
|
mkdir -p ${MDBCI_VM_PATH}/$name
|
|
|
|
export cnf_path="${MDBCI_VM_PATH}/$name/cnf/"
|
|
if [ "$product" == "mysql" ] ; then
|
|
export cnf_path=${MDBCI_VM_PATH}/$name/cnf/mysql56/
|
|
fi
|
|
|
|
|
|
eval "cat <<EOF
|
|
$(<${script_dir}/templates/${template}.json.template)
|
|
" 2> /dev/null > ${MDBCI_VM_PATH}/${name}.json
|
|
|
|
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 up $name --attempts 3 --labels MAXSCALE
|
|
if [ $? != 0 ]; then
|
|
echo "Error creating configuration"
|
|
exit 1
|
|
fi
|
|
|
|
#cp ~/build-scripts/team_keys .
|
|
mdbci public_keys --key ${team_keys} $name
|
|
|
|
exit 0
|