]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Instead of setting status='pass', set success=True
authorZack Cerza <zack.cerza@inktank.com>
Thu, 16 Oct 2014 19:57:29 +0000 (13:57 -0600)
committerZack Cerza <zack.cerza@inktank.com>
Thu, 16 Oct 2014 19:57:29 +0000 (13:57 -0600)
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 <zack.cerza@inktank.com>
teuthology/run.py
teuthology/test/test_job_status.py

index 714153aeff4d2d45074a6d0dc7d8677005086a34..2ec0fef3565416c664301775f9ccd76f9f069c44 100644 (file)
@@ -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
 
index c81014f90b324830bd59f71fd5992fd9fbdec63c..d04ace43d407018359e946677b7ada26c316b90f 100644 (file)
@@ -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'