Skip to content

Commit 586a964

Browse files
committed
Add test case
1 parent 408331b commit 586a964

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

lib/galaxy_test/api/test_workflows.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,33 @@ def test_workflow_download_instance(self):
832832
assert initial_instance_download["workflow_id"] == first_instance_id
833833
assert initial_instance_download["name"] == original_name
834834

835+
def test_workflow_run_input_extension_restriction_applied(self):
836+
workflow_id = self.workflow_populator.upload_yaml_workflow(
837+
"""
838+
class: GalaxyWorkflow
839+
inputs:
840+
tabular_input:
841+
type: data
842+
format:
843+
- tabular
844+
steps:
845+
first_cat:
846+
tool_id: cat1
847+
in:
848+
input1: tabular_input
849+
"""
850+
)
851+
with self.dataset_populator.test_history() as history_id:
852+
# Upload a txt file that should NOT be available for the tabular input
853+
self.dataset_populator.new_dataset(history_id, content="hello world", file_type="txt", wait=True)
854+
855+
# Download workflow in run style to get the form with available datasets
856+
run_workflow = self._download_workflow(workflow_id, style="run", history_id=history_id)
857+
tabular_input_step = run_workflow["steps"][0]
858+
input_options = tabular_input_step["inputs"][0]
859+
assert input_options["extensions"] == ["tabular"]
860+
assert not input_options["options"]["hda"]
861+
835862
def test_update(self):
836863
original_workflow = self.workflow_populator.load_workflow(name="test_import")
837864
uuids = {}

0 commit comments

Comments
 (0)