summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Mendizábal <mail@doug.gt>2015-03-04 17:09:21 -0600
committerDouglas Mendizábal <mail@doug.gt>2015-03-11 16:55:47 -0500
commit5a03eed46de8512bb47e7331b8eb9c3332b609c9 (patch)
tree53bbe088399f46f85db9a608df8aa3ea8c6085cf
parent847baa76f9f4366b06912e7fe525f8a7ab7a8ea1 (diff)
downloadpython-barbicanclient-5a03eed46de8512bb47e7331b8eb9c3332b609c9.tar.gz
Use functional_test.conf for devstack gate
Change-Id: I5f1149ea871e11294b5fa8501001e3113741de6d
-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 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 .