From 2d97ff3cbe1c4ddb82899cc246a3e766f057ff8c Mon Sep 17 00:00:00 2001 From: Roman Vasilets Date: Fri, 8 Apr 2016 18:50:06 +0300 Subject: [PATCH] Add functional tests to task detailed with errors Add functional test for cli testcase `rally task detailed` with errors Change-Id: I81c872c5c6c6df6f3ac255927c78d976a6b9314d --- tests/functional/test_cli_task.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/functional/test_cli_task.py b/tests/functional/test_cli_task.py index 4a7aa425..486c1335 100644 --- a/tests/functional/test_cli_task.py +++ b/tests/functional/test_cli_task.py @@ -124,6 +124,26 @@ class TaskTestCase(unittest.TestCase): self.assertIn("2. dummy_fail_test (2)", detailed_iterations_data) self.assertNotIn("n/a", detailed_iterations_data) + def test_detailed_with_errors(self): + rally = utils.Rally() + cfg = { + "Dummy.dummy_exception": [ + { + "runner": { + "type": "constant", + "times": 1, + "concurrency": 1 + } + } + ] + } + config = utils.TaskConfig(cfg) + output = rally("task start --task %s" % config.filename) + uuid = re.search( + r"(?P[0-9a-f\-]{36}): started", output).group("uuid") + output = rally("task detailed") + self.assertIn("Task %s has 1 error(s)" % uuid, output) + def test_detailed_no_atomic_actions(self): rally = utils.Rally() cfg = {