Browse Source

Merge run-tests.sh, run-functional-tests.sh

These were always called in series. No point to maintain the separation.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ic100f380eea90115f0a44a82d1d28d5d216bed68
changes/40/834840/1
Stephen Finucane 5 months ago
parent
commit
c8d8001a4f
  1. 20
      run-functional-tests.sh
  2. 25
      run-tests.sh
  3. 1
      tox.ini

20
run-functional-tests.sh

@ -1,20 +0,0 @@
#!/bin/bash -x
set -e
cleanup(){
type -t database_stop >/dev/null && database_stop || true
}
trap cleanup EXIT
export OS_TEST_PATH=aodh/tests/functional_live
export GABBI_LIVE_FAIL_IF_NO_TEST=1
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 -- stestr run $*
cleanup
done

25
run-tests.sh

@ -1,12 +1,35 @@
#!/bin/bash -x
set -e
AODH_TEST_DRIVERS=${AODH_TEST_DRIVERS:-postgresql}
export GABBI_LIVE_FAIL_IF_NO_TEST=1
export AODH_SERVICE_TOKEN=foobar # Needed for gabbi
export AODH_SERVICE_ROLES=admin
# unit tests
export OS_TEST_PATH=aodh/tests/unit
stestr run $*
# functional tests
export OS_TEST_PATH=aodh/tests/functional
AODH_TEST_DRIVERS=${AODH_TEST_DRIVERS:-postgresql}
for indexer in ${AODH_TEST_DRIVERS}
do
pifpaf -g AODH_TEST_STORAGE_URL run $indexer -- stestr run $*
done
# live functional tests
cleanup(){
type -t database_stop >/dev/null && database_stop || true
}
trap cleanup EXIT
export OS_TEST_PATH=aodh/tests/functional_live
for indexer in ${AODH_TEST_DRIVERS}
do
eval $(pifpaf -e DATABASE run $indexer)
pifpaf -e AODH run aodh --database-url $DATABASE_URL -- stestr run $*
cleanup
done

1
tox.ini

@ -25,7 +25,6 @@ deps =
passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE AODH_TEST_DRIVERS
commands =
{toxinidir}/run-tests.sh {posargs}
{toxinidir}/run-functional-tests.sh {posargs}
aodh-config-generator
allowlist_externals = bash

Loading…
Cancel
Save