mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
do not allow codefiles for TS tool loading
This commit is contained in:
@@ -292,7 +292,7 @@ class ToolValidator(object):
|
||||
tool_location_fetcher=ToolLocationFetcher(),
|
||||
)
|
||||
try:
|
||||
tool = create_tool_from_source(config_file=full_path, app=self.app, tool_source=tool_source, repository_id=repository_id)
|
||||
tool = create_tool_from_source(config_file=full_path, app=self.app, tool_source=tool_source, repository_id=repository_id, allow_code_files=False)
|
||||
valid = True
|
||||
error_message = None
|
||||
except KeyError as e:
|
||||
|
||||
@@ -27,6 +27,14 @@ def test_validate_valid_tool():
|
||||
assert message is None
|
||||
|
||||
|
||||
def test_tool_validation_denies_allow_codefile():
|
||||
with get_tool_validator() as tv, setup_bismark() as repo_dir:
|
||||
full_path = os.path.join(repo_dir, 'bismark_methylation_extractor.xml')
|
||||
tool, valid, message = tv.load_tool_from_config(repository_id=None,
|
||||
full_path=full_path)
|
||||
assert tool._allow_code_files is False
|
||||
|
||||
|
||||
def test_validate_tool_without_index():
|
||||
with get_tool_validator() as tv, setup_bismark() as repo_dir:
|
||||
full_path = os.path.join(repo_dir, 'bismark_bowtie2_wrapper.xml')
|
||||
|
||||
Reference in New Issue
Block a user