summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/functest_utils.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/utils/functest_utils.py b/utils/functest_utils.py
index d020ebac8..862b53390 100644
--- a/utils/functest_utils.py
+++ b/utils/functest_utils.py
@@ -169,9 +169,18 @@ def logger_test_results(logger, project, case_name, status, details):
version = get_version(logger)
build_tag = get_build_tag(logger)
- logger.info("Pushing %(p)s/%(n)s results: TEST_DB_URL=%(db)s "
- "pod_name=%(pod)s version=%(v)s scenario=%(s)s "
- "criteria=%(c)s details=%(d)s" % {
+ logger.info("\n"
+ "****************************************\n"
+ "\t %(p)s/%(n)s results \n\n"
+ "****************************************\n"
+ "DB:\t%(db)s\n"
+ "pod:\t%(pod)s\n"
+ "version:\t%(v)s\n"
+ "scenario:\t%(s)s\n"
+ "status:\t%(c)s\n"
+ "build tag:\t%(b)s\n"
+ "details:\t%(d)s\n"
+ % {
'p': project,
'n': case_name,
'db': get_db_url(),
@@ -210,6 +219,7 @@ def push_results_to_db(project, case_name, logger,
r = requests.post(url, data=json.dumps(params), headers=headers)
if logger:
logger.debug(r)
+ r.raise_for_status()
return True
except Exception, e:
print("Error [push_results_to_db('%s', '%s', '%s', " +