Skip to content

Commit

Permalink
Rework and improve workflow tests for tools with different versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Jul 22, 2024
1 parent 73455b4 commit 7c94e5b
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 30 deletions.
30 changes: 0 additions & 30 deletions lib/galaxy_test/api/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
19 changes: 19 additions & 0 deletions lib/galaxy_test/workflow/multiple_versions.gxwf-tests.yml
Original file line number Diff line number Diff line change
@@ -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'
20 changes: 20 additions & 0 deletions lib/galaxy_test/workflow/multiple_versions.gxwf.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7c94e5b

Please sign in to comment.