diff --git a/functionaltests/resources/v2/wf_delay_v2.yaml b/functionaltests/resources/v2/wf_delay_v2.yaml new file mode 100644 index 00000000..c8dfc39a --- /dev/null +++ b/functionaltests/resources/v2/wf_delay_v2.yaml @@ -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: $ diff --git a/mistralclient/tests/functional/cli/v2/cli_tests_v2.py b/mistralclient/tests/functional/cli/v2/cli_tests_v2.py index 3855f2e1..be32a2e9 100644 --- a/mistralclient/tests/functional/cli/v2/cli_tests_v2.py +++ b/mistralclient/tests/functional/cli/v2/cli_tests_v2.py @@ -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)