Fix execution-update CLI test
Change-Id: I0c6e080eef80865438e34bc42d85e597d4cb5330
This commit is contained in:
20
functionaltests/resources/v2/wf_delay_v2.yaml
Normal file
20
functionaltests/resources/v2/wf_delay_v2.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
version: '2.0'
|
||||
|
||||
wf_delay:
|
||||
type: direct
|
||||
|
||||
tasks:
|
||||
hello:
|
||||
action: std.echo output="Hello"
|
||||
publish:
|
||||
result: $
|
||||
policies:
|
||||
wait-after: 1
|
||||
on-success:
|
||||
- task2
|
||||
|
||||
task2:
|
||||
action: std.echo output="Task 2"
|
||||
publish:
|
||||
task2: $
|
@@ -91,6 +91,9 @@ class ClientTestBase(base.MistralCLIAuth):
|
||||
cls.wf_def = os.path.relpath(
|
||||
'functionaltests/resources/v2/wf_v2.yaml', os.getcwd())
|
||||
|
||||
cls.wf_with_delay_def = os.path.relpath(
|
||||
'functionaltests/resources/v2/wf_delay_v2.yaml', os.getcwd())
|
||||
|
||||
cls.act_def = os.path.relpath(
|
||||
'functionaltests/resources/v2/action_v2.yaml', os.getcwd())
|
||||
|
||||
@@ -282,11 +285,17 @@ class ExecutionCLITests(ClientTestBase):
|
||||
self.wf_name = wf[0]['Name']
|
||||
self.workflows.extend([workflow['Name'] for workflow in wf])
|
||||
|
||||
wf = self.mistral_command(
|
||||
'workflow-create', params='{0}'.format(self.wf_with_delay_def))
|
||||
self.wf_with_delay_name = wf[0]['Name']
|
||||
self.workflows += [self.wf_with_delay_name]
|
||||
|
||||
def tearDown(self):
|
||||
for ex in self.executions:
|
||||
self.mistral('execution-delete', params=ex)
|
||||
|
||||
self.mistral('workflow-delete', params=self.wf_name)
|
||||
self.mistral('workflow-delete', params=self.wf_with_delay_name)
|
||||
|
||||
super(ExecutionCLITests, self).tearDown()
|
||||
|
||||
@@ -314,7 +323,7 @@ class ExecutionCLITests(ClientTestBase):
|
||||
|
||||
def test_execution_update(self):
|
||||
execution = self.mistral_command(
|
||||
'execution-create', params=self.wf_name)
|
||||
'execution-create', params=self.wf_with_delay_name)
|
||||
exec_id = self.get_value_of_field(execution, 'ID')
|
||||
self.executions.append(exec_id)
|
||||
|
||||
|
Reference in New Issue
Block a user