aboutsummaryrefslogtreecommitdiffstats
path: root/functest/utils
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2017-04-21 07:41:56 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-04-21 07:41:56 +0000
commit7ebf2d7f41d8935012388f95ea5525bd9d39fdc0 (patch)
treef9358f6a7f31ce6c950dde7d8026bda302ee675b /functest/utils
parent0e12e2e5ac8f1ae46a1c19436675da5075ea8f44 (diff)
parent7e15dbb5136b1b298d86a82c03199bf1f7a6fe46 (diff)
Merge "Stop hardcoding results suffix in push_to_db"
Diffstat (limited to 'functest/utils')
-rw-r--r--functest/utils/decorators.py5
-rw-r--r--functest/utils/functest_utils.py2
2 files changed, 4 insertions, 3 deletions
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']