Skip to content

Commit

Permalink
Move empty sort workflow test into workflow test framework.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Jul 22, 2024
1 parent 2f41d1a commit 5dde290
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 38 deletions.
38 changes: 0 additions & 38 deletions lib/galaxy_test/api/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -7184,44 +7184,6 @@ def test_defaults_editor(self):
put_response = self._update_workflow(workflow_id, workflow_object)
assert put_response.status_code == 200

def test_empty_collection_sort(self, history_id):
self._run_workflow(
"""class: GalaxyWorkflow
inputs:
input: collection
filter_file: data
steps:
filter_collection:
tool_id: __FILTER_FROM_FILE__
in:
input: input
how|filter_source: filter_file
sort_collection_1:
tool_id: __SORTLIST__
in:
input: filter_collection/output_filtered
sort_collection_2:
tool_id: __SORTLIST__
in:
input: filter_collection/output_discarded
merge_collection:
tool_id: __MERGE_COLLECTION__
in:
inputs_0|input: sort_collection_1/output
inputs_1|input: sort_collection_2/output
test_data:
input:
collection_type: list
elements:
- identifier: i1
content: "0"
filter_file: i1
""",
history_id=history_id,
wait=True,
assert_ok=True,
)

@skip_without_tool("random_lines1")
def test_run_replace_params_over_default_delayed(self):
with self.dataset_populator.test_history() as history_id:
Expand Down
16 changes: 16 additions & 0 deletions lib/galaxy_test/workflow/empty_collection_sort.gxwf-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
- doc: |
Test to verify collection operations like the sort tool work fine with empty collections.
job:
input:
collection_type: list
elements:
- identifier: i1
content: "0"
filter_file: i1
outputs:
output:
elements:
i1:
asserts:
- that: has_text
text: "0"
26 changes: 26 additions & 0 deletions lib/galaxy_test/workflow/empty_collection_sort.gxwf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
class: GalaxyWorkflow
inputs:
input: collection
filter_file: data
outputs:
output:
outputSource: merge_collection/output
steps:
filter_collection:
tool_id: __FILTER_FROM_FILE__
in:
input: input
how|filter_source: filter_file
sort_collection_1:
tool_id: __SORTLIST__
in:
input: filter_collection/output_filtered
sort_collection_2:
tool_id: __SORTLIST__
in:
input: filter_collection/output_discarded
merge_collection:
tool_id: __MERGE_COLLECTION__
in:
inputs_0|input: sort_collection_1/output
inputs_1|input: sort_collection_2/output

0 comments on commit 5dde290

Please sign in to comment.