From 5dde290b55c4ef07e1500bc9522a675cd72d2f03 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Sat, 13 Jul 2024 16:48:15 -0400 Subject: [PATCH] Move empty sort workflow test into workflow test framework. --- lib/galaxy_test/api/test_workflows.py | 38 ------------------- .../empty_collection_sort.gxwf-tests.yml | 16 ++++++++ .../workflow/empty_collection_sort.gxwf.yml | 26 +++++++++++++ 3 files changed, 42 insertions(+), 38 deletions(-) create mode 100644 lib/galaxy_test/workflow/empty_collection_sort.gxwf-tests.yml create mode 100644 lib/galaxy_test/workflow/empty_collection_sort.gxwf.yml diff --git a/lib/galaxy_test/api/test_workflows.py b/lib/galaxy_test/api/test_workflows.py index c42da227984e..d2e5f9d441a6 100644 --- a/lib/galaxy_test/api/test_workflows.py +++ b/lib/galaxy_test/api/test_workflows.py @@ -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: diff --git a/lib/galaxy_test/workflow/empty_collection_sort.gxwf-tests.yml b/lib/galaxy_test/workflow/empty_collection_sort.gxwf-tests.yml new file mode 100644 index 000000000000..ad83bb676b67 --- /dev/null +++ b/lib/galaxy_test/workflow/empty_collection_sort.gxwf-tests.yml @@ -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" diff --git a/lib/galaxy_test/workflow/empty_collection_sort.gxwf.yml b/lib/galaxy_test/workflow/empty_collection_sort.gxwf.yml new file mode 100644 index 000000000000..7520bcd5d68f --- /dev/null +++ b/lib/galaxy_test/workflow/empty_collection_sort.gxwf.yml @@ -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