diff options
author | Douglas Mendizábal <mail@doug.gt> | 2015-03-04 17:09:21 -0600 |
---|---|---|
committer | Douglas Mendizábal <mail@doug.gt> | 2015-03-11 16:55:47 -0500 |
commit | 5a03eed46de8512bb47e7331b8eb9c3332b609c9 (patch) | |
tree | 53bbe088399f46f85db9a608df8aa3ea8c6085cf | |
parent | 847baa76f9f4366b06912e7fe525f8a7ab7a8ea1 (diff) | |
download | python-barbicanclient-5a03eed46de8512bb47e7331b8eb9c3332b609c9.tar.gz |
Use functional_test.conf for devstack gate
Change-Id: I5f1149ea871e11294b5fa8501001e3113741de6d
-rw-r--r-- | etc/functional_tests.conf | 2 | ||||
-rw-r--r-- | functionaltests/__init__.py | 16 | ||||
-rwxr-xr-x | 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 304538a..1457014 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 ab28f58..9b21b31 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 05b97c3..6e53ab3 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 . |