From 7c94e5b3bc760771793578d4712ad8ff0b225bcc Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 22 Jul 2024 12:36:21 -0400 Subject: [PATCH] Rework and improve workflow tests for tools with different versions. --- lib/galaxy_test/api/test_workflows.py | 30 ------------------- .../workflow/multiple_versions.gxwf-tests.yml | 19 ++++++++++++ .../workflow/multiple_versions.gxwf.yml | 20 +++++++++++++ 3 files changed, 39 insertions(+), 30 deletions(-) create mode 100644 lib/galaxy_test/workflow/multiple_versions.gxwf-tests.yml create mode 100644 lib/galaxy_test/workflow/multiple_versions.gxwf.yml diff --git a/lib/galaxy_test/api/test_workflows.py b/lib/galaxy_test/api/test_workflows.py index 7c144ebadc81..8572f2e44f15 100644 --- a/lib/galaxy_test/api/test_workflows.py +++ b/lib/galaxy_test/api/test_workflows.py @@ -1495,36 +1495,6 @@ def test_run_workflow_by_name(self): def test_run_workflow(self): self.__run_cat_workflow(inputs_by="step_id") - @skip_without_tool("multiple_versions") - def test_run_versioned_tools(self): - with self.dataset_populator.test_history() as history_01_id: - workflow_version_01 = self._upload_yaml_workflow( - """ -class: GalaxyWorkflow -steps: - multiple: - tool_id: multiple_versions - tool_version: "0.1" - state: - inttest: 0 -""" - ) - self.workflow_populator.invoke_workflow_and_wait(workflow_version_01, history_id=history_01_id) - - with self.dataset_populator.test_history() as history_02_id: - workflow_version_02 = self._upload_yaml_workflow( - """ -class: GalaxyWorkflow -steps: - multiple: - tool_id: multiple_versions - tool_version: "0.2" - state: - inttest: 1 -""" - ) - self.workflow_populator.invoke_workflow_and_wait(workflow_version_02, history_id=history_02_id) - def __run_cat_workflow(self, inputs_by): workflow = self.workflow_populator.load_workflow(name="test_for_run") workflow["steps"]["0"]["uuid"] = str(uuid4()) diff --git a/lib/galaxy_test/workflow/multiple_versions.gxwf-tests.yml b/lib/galaxy_test/workflow/multiple_versions.gxwf-tests.yml new file mode 100644 index 000000000000..1d1db5dba980 --- /dev/null +++ b/lib/galaxy_test/workflow/multiple_versions.gxwf-tests.yml @@ -0,0 +1,19 @@ +- doc: | + Test that workflows can run with multiple versions of tools and the version specified matches the one run. + job: + input: + value: 1 + type: raw + outputs: + output_1: + asserts: + - that: has_text + text: 'Version 0.1' + - that: not_has_text + text: 'Version 0.2' + output_2: + asserts: + - that: has_text + text: 'Version 0.2' + - that: not_has_text + text: 'Version 0.1' diff --git a/lib/galaxy_test/workflow/multiple_versions.gxwf.yml b/lib/galaxy_test/workflow/multiple_versions.gxwf.yml new file mode 100644 index 000000000000..abcdd44e2ca8 --- /dev/null +++ b/lib/galaxy_test/workflow/multiple_versions.gxwf.yml @@ -0,0 +1,20 @@ +class: GalaxyWorkflow +inputs: + input: + type: int +outputs: + output_1: + outputSource: multiple_1/out_file1 + output_2: + outputSource: multiple_2/out_file1 +steps: + multiple_1: + tool_id: multiple_versions + tool_version: "0.1" + in: + inttest: input + multiple_2: + tool_id: multiple_versions + tool_version: "0.2" + in: + inttest: input