Move empty sort workflow test into workflow test framework.

This commit is contained in:
John Chilton
2024-07-29 09:19:09 -04:00
parent ece5025f84
commit 8697b61d45
3 changed files with 42 additions and 38 deletions
-38
View File
@@ -7184,44 +7184,6 @@ input:
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:
@@ -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"
@@ -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