From 5a03eed46de8512bb47e7331b8eb9c3332b609c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Douglas=20Mendiz=C3=A1bal?= Date: Wed, 4 Mar 2015 17:09:21 -0600 Subject: [PATCH] Use functional_test.conf for devstack gate Change-Id: I5f1149ea871e11294b5fa8501001e3113741de6d --- etc/functional_tests.conf | 2 +- functionaltests/__init__.py | 16 +++++++++++++--- functionaltests/run_tests.sh | 2 ++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/etc/functional_tests.conf b/etc/functional_tests.conf index 304538ac..1457014e 100644 --- a/etc/functional_tests.conf +++ b/etc/functional_tests.conf @@ -5,7 +5,7 @@ #Replace values that represent barbican server and user information url=http://localhost:9311 username=barbican -password=orange +password=secretservice project_name=service project_id=service max_payload_size=10000 diff --git a/functionaltests/__init__.py b/functionaltests/__init__.py index ab28f589..9b21b312 100644 --- a/functionaltests/__init__.py +++ b/functionaltests/__init__.py @@ -17,9 +17,19 @@ import os from tempest import config + CONF = config.CONF + +def _get_conf_file_path(): + functional_dir = os.path.split(os.path.abspath(__file__))[0] + base_dir = os.path.split(functional_dir)[0] + return os.path.join(base_dir, 'etc', 'functional_tests.conf') + + # Use local tempest conf if one is available. -# This usually means we're running tests outside of devstack -if os.path.exists('./etc/functional_tests.conf'): - CONF.set_config_path('./etc/functional_tests.conf') \ No newline at end of file +conf_file = _get_conf_file_path() +if os.path.exists(conf_file): + CONF.set_config_path(conf_file) + + diff --git a/functionaltests/run_tests.sh b/functionaltests/run_tests.sh index 05b97c39..6e53ab38 100755 --- a/functionaltests/run_tests.sh +++ b/functionaltests/run_tests.sh @@ -21,4 +21,6 @@ pip install -e $TEMPEST_DIR # Install test-requirements pip install -r /opt/stack/new/python-barbicanclient/test-requirements.txt +echo "Running functional tests on $(python -V)" + nosetests -v .