From 80e0a969ee74ffec750c6d6b4d7ec5c9ed32e24f Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 16 Oct 2014 13:57:29 -0600 Subject: [PATCH] Instead of setting status='pass', set success=True Keeping this old behavior will mean that any tasks that are not updated to use set_status() and still simply set success=False will still be able to properly report their failures. Signed-off-by: Zack Cerza --- teuthology/run.py | 3 +-- teuthology/test/test_job_status.py | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/teuthology/run.py b/teuthology/run.py index 714153aeff..2ec0fef356 100644 --- a/teuthology/run.py +++ b/teuthology/run.py @@ -132,8 +132,7 @@ def main(ctx): log.debug('\n '.join(['Config:', ] + yaml.safe_dump( ctx.config, default_flow_style=False).splitlines())) - ctx.summary = dict(status='pass') - set_status(ctx.summary, 'pass') + ctx.summary = dict(success=True) ctx.summary['owner'] = ctx.owner diff --git a/teuthology/test/test_job_status.py b/teuthology/test/test_job_status.py index c81014f90b..d04ace43d4 100644 --- a/teuthology/test/test_job_status.py +++ b/teuthology/test/test_job_status.py @@ -52,3 +52,9 @@ class TestJobStatus(object): summary = dict() job_status.set_status(summary, None) assert summary == dict() + + def test_legacy_fail(self): + summary = dict(success=True) + summary['success'] = False + status = job_status.get_status(summary) + assert status == 'fail' -- 2.39.5