From 5d11899ad3d64949859ceb72597dcbbcdf2a3706 Mon Sep 17 00:00:00 2001 From: Nikolay Mahotkin Date: Thu, 6 Nov 2014 18:11:16 +0300 Subject: [PATCH] Fill 'wf_name' task_db field * Now wf_name is shown correctly in task CLI commands Closes-bug: #1388013 Change-Id: I8a07c4f377e44153905c0b93da5dfc1fef518337 --- mistral/engine1/commands.py | 3 ++- mistral/tests/unit/engine1/test_default_engine.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mistral/engine1/commands.py b/mistral/engine1/commands.py index 882d1e86f..f49c667f4 100644 --- a/mistral/engine1/commands.py +++ b/mistral/engine1/commands.py @@ -100,7 +100,8 @@ class RunTask(EngineCommand): 'input': None, 'in_context': None, 'output': None, - 'runtime_context': None + 'runtime_context': None, + 'wf_name': exec_db.wf_name }) def _run_task(self): diff --git a/mistral/tests/unit/engine1/test_default_engine.py b/mistral/tests/unit/engine1/test_default_engine.py index cdbffce84..53be3775c 100644 --- a/mistral/tests/unit/engine1/test_default_engine.py +++ b/mistral/tests/unit/engine1/test_default_engine.py @@ -93,6 +93,7 @@ class DefaultEngineTest(base.DbTestCase): task_db = exec_db.tasks[0] + self.assertEqual('wb.wf1', task_db.wf_name) self.assertEqual('task1', task_db.name) self.assertEqual(states.RUNNING, task_db.state) self.assertIsNotNone(task_db.spec)