mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
fix small bug in toolbox's get_tool() so non-shed tool can be used for missing tool workflow invocation test
This commit is contained in:
@@ -594,7 +594,7 @@ class AbstractToolBox(Dictifiable, ManagesIntegratedToolPanelMixin):
|
||||
return self._tools_by_id[tool_id]
|
||||
elif tool_version in self._tool_versions_by_id[tool_id]:
|
||||
return self._tool_versions_by_id[tool_id][tool_version]
|
||||
elif exact:
|
||||
if exact:
|
||||
# We're looking for an exact match, so we skip lineage and
|
||||
# versionless mapping, though we may want to check duplicate
|
||||
# toolsheds
|
||||
|
||||
@@ -20,7 +20,6 @@ from galaxy_test.base.populators import (
|
||||
wait_on,
|
||||
WorkflowPopulator
|
||||
)
|
||||
from galaxy_test.base.uses_shed import UsesShed
|
||||
from galaxy_test.base.workflow_fixtures import (
|
||||
WORKFLOW_NESTED_REPLACEMENT_PARAMETER,
|
||||
WORKFLOW_NESTED_RUNTIME_PARAMETER,
|
||||
@@ -209,7 +208,7 @@ input1:
|
||||
# - Allow post to workflows/<workflow_id>/run in addition to posting to
|
||||
# /workflows with id in payload.
|
||||
# - Much more testing obviously, always more testing.
|
||||
class WorkflowsApiTestCase(BaseWorkflowsApiTestCase, ChangeDatatypeTestCase, UsesShed):
|
||||
class WorkflowsApiTestCase(BaseWorkflowsApiTestCase, ChangeDatatypeTestCase):
|
||||
def test_show_valid(self):
|
||||
workflow_id = self.workflow_populator.simple_workflow("dummy")
|
||||
workflow_id = self.workflow_populator.simple_workflow("test_regular")
|
||||
@@ -876,7 +875,6 @@ steps:
|
||||
assert invocation["state"] == "scheduled", invocation
|
||||
|
||||
def test_run_workflow_with_missing_tool(self):
|
||||
self.install_repository("iuc", "compose_text_param", "feb3acba1e0a") # 0.1.0
|
||||
with self.dataset_populator.test_history() as history_id:
|
||||
workflow_id = self._upload_yaml_workflow("""
|
||||
class: GalaxyWorkflow
|
||||
@@ -886,21 +884,21 @@ steps:
|
||||
tool_version: "0.1"
|
||||
label: nonexistent
|
||||
compose_text_param:
|
||||
tool_id: compose_text_param
|
||||
tool_version: 0.0.1
|
||||
label: compose_text_param
|
||||
tool_id: multiple_versions
|
||||
tool_version: 0.3
|
||||
label: multiple_versions
|
||||
"""
|
||||
)
|
||||
# should fail and return both tool ids since version 0.0.1 of compose_text_param does not exist
|
||||
# should fail and return both tool ids since version 0.3 of multiple_versions does not exist
|
||||
invocation_response = self.__invoke_workflow(
|
||||
workflow_id, history_id=history_id, assert_ok=False, request={"require_exact_tool_versions": True}
|
||||
)
|
||||
self._assert_status_code_is(invocation_response, 400)
|
||||
self.assertEqual(
|
||||
invocation_response.json().get("err_msg"),
|
||||
"Workflow was not invoked; the following required tools are not installed: nonexistent_tool (version 0.1), compose_text_param (version 0.0.1)",
|
||||
"Workflow was not invoked; the following required tools are not installed: nonexistent_tool (version 0.1), multiple_versions (version 0.3)",
|
||||
)
|
||||
# should fail but return only the tool_id of non_existent tool as another version of compose_text_param is installed
|
||||
# should fail but return only the tool_id of non_existent tool as another version of multiple_versions is installed
|
||||
invocation_response = self.__invoke_workflow(
|
||||
workflow_id, history_id=history_id, assert_ok=False, request={"require_exact_tool_versions": False}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user