aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/features/doctor.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-03-17 18:09:12 +0100
committerMorgan Richomme <morgan.richomme@orange.com>2016-03-18 10:45:44 +0100
commit7c9aef8db83e025034e3427c1330a00420fae50a (patch)
tree4eb3c1ce63dc76da10d8d00d20ca270491d9a242 /testcases/features/doctor.py
parentd9d32a3f3f45b4f9008201e82235b33910e0f7f6 (diff)
Add criteria and version when pushing the results into test DB
JIRA: FUNCTEST-151 Change-Id: Iac36f28db5f2203d7b2977a2bb973534fe167bac Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'testcases/features/doctor.py')
-rw-r--r--testcases/features/doctor.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/testcases/features/doctor.py b/testcases/features/doctor.py
index 52ffaa900..a225d5a50 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__':