Fix execution state choices and commenting workflow input in triggers
* We'll need to uncomment workflow input column in cron triggers when passwords are handled properly Change-Id: I098e5d8240bb0504d8f850d5a0067989bbe8dc5c
This commit is contained in:
@@ -35,21 +35,23 @@ def format(trigger=None, lister=False):
|
||||
'Name',
|
||||
'Pattern',
|
||||
'Workflow',
|
||||
'Workflow input',
|
||||
# TODO (rakhmerov): Uncomment when passwords are handled properly.
|
||||
# 'Workflow input',
|
||||
'Next execution time',
|
||||
'Created at',
|
||||
'Updated at'
|
||||
)
|
||||
|
||||
if trigger:
|
||||
wf_input = trigger.workflow_input if not lister \
|
||||
else base.cut(trigger.workflow_input)
|
||||
# wf_input = trigger.workflow_input if not lister \
|
||||
# else base.cut(trigger.workflow_input)
|
||||
|
||||
data = (
|
||||
trigger.name,
|
||||
trigger.pattern,
|
||||
trigger.workflow_name,
|
||||
wf_input,
|
||||
# TODO (rakhmerov): Uncomment when passwords are handled properly.
|
||||
# wf_input,
|
||||
trigger.next_execution_time,
|
||||
trigger.created_at,
|
||||
)
|
||||
|
@@ -151,7 +151,7 @@ class Update(show.ShowOne):
|
||||
)
|
||||
parser.add_argument(
|
||||
'state',
|
||||
choices=['RUNNING', 'SUSPENDED', 'STOPPED', 'SUCCESS', 'ERROR'],
|
||||
choices=['RUNNING', 'PAUSED', 'SUCCESS', 'ERROR'],
|
||||
help='Execution state'
|
||||
)
|
||||
|
||||
|
@@ -253,13 +253,13 @@ class ExecutionCLITests(ClientTestBase):
|
||||
self.assertEqual('RUNNING', status)
|
||||
|
||||
execution = self.mistral_command(
|
||||
'execution-update', params='{0} "STOPPED"'.format(exec_id))
|
||||
'execution-update', params='{0} "PAUSED"'.format(exec_id))
|
||||
|
||||
updated_exec_id = self.get_value_of_field(execution, 'ID')
|
||||
status = self.get_value_of_field(execution, 'State')
|
||||
|
||||
self.assertEqual(exec_id, updated_exec_id)
|
||||
self.assertEqual('STOPPED', status)
|
||||
self.assertEqual('PAUSED', status)
|
||||
|
||||
def test_execution_get(self):
|
||||
execution = self.mistral_command(
|
||||
|
@@ -49,7 +49,7 @@ class TestCLIWorkbooksV2(base.BaseCommandTest):
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
('my_trigger', '* * * * *', 'flow1', {}, '1', '1', '1'),
|
||||
('my_trigger', '* * * * *', 'flow1', '1', '1', '1'),
|
||||
result[1]
|
||||
)
|
||||
|
||||
@@ -60,7 +60,7 @@ class TestCLIWorkbooksV2(base.BaseCommandTest):
|
||||
result = self.call(cron_triggers_cmd.List)
|
||||
|
||||
self.assertEqual(
|
||||
[('my_trigger', '* * * * *', 'flow1', {}, '1', '1', '1')],
|
||||
[('my_trigger', '* * * * *', 'flow1', '1', '1', '1')],
|
||||
result[1]
|
||||
)
|
||||
|
||||
@@ -71,7 +71,7 @@ class TestCLIWorkbooksV2(base.BaseCommandTest):
|
||||
result = self.call(cron_triggers_cmd.Get, app_args=['name'])
|
||||
|
||||
self.assertEqual(
|
||||
('my_trigger', '* * * * *', 'flow1', {}, '1', '1', '1'),
|
||||
('my_trigger', '* * * * *', 'flow1', '1', '1', '1'),
|
||||
result[1]
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user