aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/features/doctor.py
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-06-08 15:56:54 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2016-06-08 16:43:47 +0200
commit03fc68820d1badd600832de3b7c6dd72368dd198 (patch)
tree0ece513a5ea3acd1296e299fd1e09a331f80ad03 /testcases/features/doctor.py
parent4c971bff1c2e4665bbf389f84acfa4d2c81f9b55 (diff)
Adapt functest testcase to APi refactoring
JIRA: FUNCTEST-303 Change-Id: Ia276d9ca6e8d62b496c3b5f81561b14b02c43fd7 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'testcases/features/doctor.py')
-rw-r--r--testcases/features/doctor.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/testcases/features/doctor.py b/testcases/features/doctor.py
index ac68430a9..c7fc848c5 100644
--- a/testcases/features/doctor.py
+++ b/testcases/features/doctor.py
@@ -34,12 +34,12 @@ logger = ft_logger.Logger("doctor").getLogger()
def main():
cmd = 'cd %s/tests && ./run.sh' % DOCTOR_REPO
- start_time_ts = time.time()
+ start_time = time.time()
ret = functest_utils.execute_command(cmd, logger, exit_on_error=False)
- end_time_ts = time.time()
- duration = round(end_time_ts - start_time_ts, 1)
+ stop_time = time.time()
+ duration = round(end_time_ts - start_time, 1)
if ret:
logger.info("doctor OK")
test_status = 'OK'
@@ -48,7 +48,7 @@ def main():
test_status = 'NOK'
details = {
- 'timestart': start_time_ts,
+ 'timestart': start_time,
'duration': duration,
'status': test_status,
}
@@ -61,7 +61,7 @@ def main():
if details['status'] == "OK":
status = "passed"
- logger.info("Pushing result: TEST_DB_URL=%(db)s pod_name=%(pod)s "
+ logger.info("Pushing Doctor results: TEST_DB_URL=%(db)s pod_name=%(pod)s "
"version=%(v)s scenario=%(s)s criteria=%(c)s details=%(d)s" % {
'db': TEST_DB_URL,
'pod': pod_name,
@@ -71,11 +71,13 @@ def main():
'b': build_tag,
'd': details,
})
- functest_utils.push_results_to_db(TEST_DB_URL,
- 'doctor', 'doctor-notification',
- logger, pod_name, version, scenario,
- status, build_tag, details)
-
+ functest_utils.push_results_to_db("doctor",
+ "doctor-notification",
+ logger,
+ start_time,
+ stop_time,
+ status,
+ details)
if __name__ == '__main__':
main()