aodh/run-functional-tests.sh
Mehdi Abaakouk 3b365a1876 tests: rework functional live tests
This allows to run functional live tests without devstack.
And runs tests within the normal tox target without devstack

This increases test coverage because all backend are now tested.

Change-Id: If475b6d1f43a44540f276209a3651e7e790c2233
2017-07-13 12:57:41 +02:00

21 lines
522 B
Bash
Executable File

#!/bin/bash -x
set -e
cleanup(){
type -t database_stop >/dev/null && database_stop || true
}
trap cleanup EXIT
export GABBI_LIVE_FAIL_IF_NO_TEST=1
export OS_TEST_PATH=aodh/tests/functional_live/
export AODH_SERVICE_TOKEN=foobar # Needed for gabbi
export AODH_SERVICE_ROLES=admin
AODH_TEST_DRIVERS=${AODH_TEST_DRIVERS:-postgresql}
for indexer in ${AODH_TEST_DRIVERS}
do
eval $(pifpaf -e DATABASE run $indexer)
pifpaf -e AODH run aodh --database-url $DATABASE_URL -- ./tools/pretty_tox.sh $*
cleanup
done