summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2016-08-30 10:33:39 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2016-08-30 09:06:09 +0000
commit75e7373b354998f289e521b6274e130c6600be8d (patch)
treeade3f8b89103e6d6054f9d627217fabe5b4c546c /ci
parent5672607e5050c97eb619e92bc7fc830b7a70f313 (diff)
Stop hard-coding db url
Change-Id: I587ac6d210135e7124ba006a977a675a4d38b518 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit fee070fcc4a31735abb88b303742bb05f12b53e7)
Diffstat (limited to 'ci')
-rwxr-xr-xci/generate_report.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ci/generate_report.py b/ci/generate_report.py
index 3ca2847bd..d2e09eb80 100755
--- a/ci/generate_report.py
+++ b/ci/generate_report.py
@@ -3,6 +3,7 @@ import os
import re
import urllib2
import functest.utils.functest_logger as ft_logger
+import functest.utils.functest_utils as ft_utils
COL_1_LEN = 25
@@ -32,8 +33,7 @@ def init(tiers_to_run):
def get_results_from_db():
- url = 'http://testresults.opnfv.org/test/api/v1/results?build_tag=' + \
- BUILD_TAG
+ url = ft_utils.get_db_url() + '/results?build_tag=' + BUILD_TAG
logger.debug("Query to rest api: %s" % url)
try:
data = json.load(urllib2.urlopen(url))
@@ -49,7 +49,7 @@ def get_data(test, results):
for test_db in results:
if test['test_name'] in test_db['case_name']:
id = test_db['_id']
- url = 'http://testresults.opnfv.org/test/api/v1/results/' + id
+ url = ft_utils.get_db_url() + '/results/' + id
test_result = test_db['criteria']
return {"url": url, "result": test_result}