You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.1 KiB
39 lines
1.1 KiB
#!/bin/bash
|
|
|
|
|
|
cd "${0%/*}" || exit 1
|
|
|
|
echo "--> Generating the Ansible inventory files..."
|
|
ansible-playbook -i /dev/null write-inventory-files.yml
|
|
ret=$?
|
|
if [ "$ret" -gt 0 ]; then
|
|
echo "--> Ansible inventory files generation FAILED !"
|
|
exit 1
|
|
else
|
|
echo "--> Ansible inventory files generation SUCCEEDED !"
|
|
fi
|
|
|
|
# Because of a bug in Ansible, we need to move one directory upper before running
|
|
# the playbooks.
|
|
#
|
|
# The bug makes the playbooks fail after the Application Plans creation/update
|
|
# with this error message:
|
|
#
|
|
# ERROR! Unexpected Exception, this is probably a bug: expected str, bytes or os.PathLike object, not NoneType
|
|
#
|
|
cd ".." || exit 1
|
|
|
|
for environment in tests/environments/3scale-*; do
|
|
for testcase in tests/test-cases/*.y*ml; do
|
|
echo "--> Running $testcase against $environment..."
|
|
ansible-playbook -i "$environment" -v "$testcase"
|
|
ret=$?
|
|
if [ "$ret" -gt 0 ]; then
|
|
echo "--> $testcase against $environment FAILED !"
|
|
exit 1
|
|
else
|
|
echo "--> $testcase against $environment SUCCEEDED !"
|
|
fi
|
|
break
|
|
done
|
|
done
|