From 7c9aef8db83e025034e3427c1330a00420fae50a Mon Sep 17 00:00:00 2001 From: Morgan Richomme Date: Thu, 17 Mar 2016 18:09:12 +0100 Subject: Add criteria and version when pushing the results into test DB JIRA: FUNCTEST-151 Change-Id: Iac36f28db5f2203d7b2977a2bb973534fe167bac Signed-off-by: Morgan Richomme --- testcases/features/doctor.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'testcases/features/doctor.py') diff --git a/testcases/features/doctor.py b/testcases/features/doctor.py index 52ffaa90..a225d5a5 100644 --- a/testcases/features/doctor.py +++ b/testcases/features/doctor.py @@ -15,7 +15,6 @@ # import logging -import os import sys import time import yaml @@ -63,19 +62,27 @@ def main(): } pod_name = functest_utils.get_pod_name(logger) scenario = functest_utils.get_scenario(logger) + version = scenario build_tag = functest_utils.get_build_tag(logger) + + status = "failed" + if details['status'] == "OK": + status = "passed" + logger.info("Pushing result: TEST_DB_URL=%(db)s pod_name=%(pod)s " - "scenario=%(s)s details=%(d)s" % { + "version=%(v)s scenario=%(s)s criteria=%(c)s details=%(d)s" % { 'db': TEST_DB_URL, 'pod': pod_name, + 'v': version, 's': scenario, + 'c': status, 'b': build_tag, 'd': details, }) functest_utils.push_results_to_db(TEST_DB_URL, - 'doctor','doctor-notification', - logger, pod_name, scenario, - build_tag, details) + 'doctor', 'doctor-notification', + logger, pod_name, version, scenario, + status, build_tag, details) if __name__ == '__main__': -- cgit 1.2.3-korg