Skip to content

Commit

Permalink
Add test for allow_uri_if_protocol with deferred input
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Oct 30, 2024
1 parent 1f4e490 commit d819107
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/galaxy_test/api/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2637,6 +2637,24 @@ def test_metadata_validator_can_fail_on_deferred_input(self, history_id):
job_details = self.dataset_populator.get_job_details(job_id=job_id).json()
assert job_details["state"] == "failed"

@skip_without_tool("gx_allow_uri_if_protocol")
def test_allow_uri_if_protocol_on_deferred_input(self, history_id):
source_uri = "https://raw.githubusercontent.com/galaxyproject/galaxy/dev/test-data/simple_line.txt"
deferred_hda = self.dataset_populator.create_deferred_hda(history_id, source_uri, ext="txt")

inputs = {"input1": dataset_to_param(deferred_hda)}
# The tool just returns the URI (or file path if it was materialized) as the output content
run_response = self.dataset_populator.run_tool(
tool_id="gx_allow_uri_if_protocol", inputs=inputs, history_id=history_id
)
output = run_response["outputs"][0]
output_details = self.dataset_populator.get_history_dataset_details(
history_id, dataset=output, wait=True, assert_ok=True
)
assert output_details["state"] == "ok"
output_content = self.dataset_populator.get_history_dataset_content(history_id, dataset=output)
assert output_content.strip() == source_uri.strip()

@skip_without_tool("cat1")
def test_run_deferred_mapping(self, history_id: str):
elements = [
Expand Down

0 comments on commit d819107

Please sign in to comment.