aboutsummaryrefslogtreecommitdiffstats
path: root/functest
diff options
context:
space:
mode:
Diffstat (limited to 'functest')
-rwxr-xr-xfunctest/ci/config_functest.yaml6
-rw-r--r--functest/utils/decorators.py5
-rw-r--r--functest/utils/functest_utils.py2
3 files changed, 7 insertions, 6 deletions
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml
index 95a4408a..a9ad15ca 100755
--- a/functest/ci/config_functest.yaml
+++ b/functest/ci/config_functest.yaml
@@ -201,6 +201,6 @@ example:
sg_desc: Example Security group
results:
- # you can also set a dir (e.g. /home/opnfv/db) to dump results
- # test_db_url: file:///home/opnfv/db
- test_db_url: http://testresults.opnfv.org/test/api/v1
+ # you can also set a file (e.g. /home/opnfv/functest/results/dump.txt) to dump results
+ # test_db_url: file:///home/opnfv/functest/results/dump.txt
+ test_db_url: http://testresults.opnfv.org/test/api/v1/results
diff --git a/functest/utils/decorators.py b/functest/utils/decorators.py
index 276235d9..2ca31066 100644
--- a/functest/utils/decorators.py
+++ b/functest/utils/decorators.py
@@ -13,11 +13,12 @@ def can_dump_request_to_file(method):
parseresult = urlparse.urlparse(request.url)
if parseresult.scheme == "file":
try:
- os.makedirs(parseresult.path)
+ dirname = os.path.dirname(parseresult.path)
+ os.makedirs(dirname)
except OSError as e:
if e.errno != errno.EEXIST:
raise
- with open(os.path.join(parseresult.path, 'dump.txt'), 'a') as f:
+ with open(parseresult.path, 'a') as f:
headers = ""
for key in request.headers:
headers += key + " " + request.headers[key] + "\n"
diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py
index ef9d3da9..0d612412 100644
--- a/functest/utils/functest_utils.py
+++ b/functest/utils/functest_utils.py
@@ -197,7 +197,7 @@ def push_results_to_db(project, case_name,
POST results to the Result target DB
"""
# Retrieve params from CI and conf
- url = get_db_url() + "/results"
+ url = get_db_url()
try:
installer = os.environ['INSTALLER_TYPE']