8a01dd8e68
Added testing functionality for using different db backends. Сurrently exists ability to define backend-specific tests along with regular tests. Assuming that the tests will be run under a variety of backend there exists opportunity to skip backend-specific tests at inappropriate backends. For the correct functioning of the tests required to export environment variable with a root access database uri. Blueprint: tests-given-db-backend Change-Id: Ic5d3cfe8764b3c04affe79088473255c17535e54
18 lines
828 B
Plaintext
18 lines
828 B
Plaintext
[DEFAULT]
|
|
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
|
|
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
|
|
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
|
|
${PYTHON:-python} -m subunit.run discover -s tests $LISTOPT $IDOPTION
|
|
|
|
test_id_option=--load-list $IDFILE
|
|
test_list_option=--list
|
|
|
|
# NOTE(ipekelny): create an isolated DB instance for each test running process
|
|
# to prevent race conditions. Please see
|
|
# https://testrepository.readthedocs.org/en/latest/MANUAL.html#remote-or-isolated-test-environments
|
|
# for details.
|
|
|
|
instance_provision=${PYTHON:-python} ./openstack/common/db/sqlalchemy/provision.py create $INSTANCE_COUNT
|
|
instance_dispose=${PYTHON:-python} ./openstack/common/db/sqlalchemy/provision.py drop $INSTANCE_IDS
|
|
instance_execute=OS_TEST_DBAPI_CONNECTION=$INSTANCE_ID $COMMAND
|