summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-03-13 17:13:55 +0000
committerGerrit Code Review <review@openstack.org>2015-03-13 17:13:55 +0000
commit456ec16fd2d1dc82b78d58ef6f4144dd68ed7475 (patch)
tree74d4c599e5b803d51044e10b3966c71a2d0d5836
parent96668c30610e944b99b34d9ada20515f24a87bef (diff)
parent5a03eed46de8512bb47e7331b8eb9c3332b609c9 (diff)
downloadpython-barbicanclient-456ec16fd2d1dc82b78d58ef6f4144dd68ed7475.tar.gz
Merge "Use functional_test.conf for devstack gate"
-rw-r--r--etc/functional_tests.conf2
-rw-r--r--functionaltests/__init__.py16
-rwxr-xr-xfunctionaltests/run_tests.sh2
3 files changed, 16 insertions, 4 deletions
diff --git a/etc/functional_tests.conf b/etc/functional_tests.conf
index 7fef2af..25065bc 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 .