@@ -5792,6 +5792,54 @@ def test_run_with_default_file_in_step_inline(self):
57925792 content = self .dataset_populator .get_history_dataset_content (history_id )
57935793 assert "chr1" in content
57945794
5795+ def test_conditional_skip_on_database_operation_collection_output (self ):
5796+ with self .dataset_populator .test_history () as history_id :
5797+ summary = self ._run_workflow (
5798+ """
5799+ class: GalaxyWorkflow
5800+ inputs:
5801+ input_collection: collection
5802+ steps:
5803+ filter:
5804+ tool_id: __FILTER_FAILED_DATASETS__
5805+ in:
5806+ input: input_collection
5807+ when: $(false)
5808+ """ ,
5809+ test_data = """
5810+ input_collection:
5811+ collection_type: list
5812+ elements:
5813+ - identifier: el1
5814+ content: "test content 1"
5815+ """ ,
5816+ history_id = history_id ,
5817+ wait = True ,
5818+ assert_ok = True ,
5819+ )
5820+ invocation = self .workflow_populator .get_invocation (summary .invocation_id , step_details = True )
5821+
5822+ input_hdca_details = self .dataset_populator .get_history_collection_details (
5823+ history_id , content_id = invocation ["inputs" ]["0" ]["id" ]
5824+ )
5825+ input_hda = input_hdca_details ["elements" ][0 ]["object" ]
5826+ filter_content = self .dataset_populator .get_history_dataset_content (
5827+ history_id = history_id , content_id = input_hda ["id" ]
5828+ )
5829+ assert "test content 1" in filter_content , f"Expected 'test content 1' in input, got: { filter_content } "
5830+
5831+ # Get the filter step output
5832+ filter_step = [s for s in invocation ["steps" ] if s ["workflow_step_label" ] == "filter" ][0 ]
5833+ filter_output_id = filter_step ["output_collections" ]["output" ]["id" ]
5834+ hdca = self .dataset_populator .get_history_collection_details (history_id , content_id = filter_output_id )
5835+ hda = hdca ["elements" ][0 ]["object" ]
5836+
5837+ # Assert that the filter output dataset contains the string 'null'
5838+ filter_content = self .dataset_populator .get_history_dataset_content (
5839+ history_id = history_id , content_id = hda ["id" ]
5840+ )
5841+ assert "null" in filter_content , f"Expected 'null' in filter output, got: { filter_content } "
5842+
57955843 def test_conditional_flat_crossproduct_subworkflow (self ):
57965844 parent = yaml .safe_load (
57975845 """
0 commit comments