mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix failing unit tests for 60d8de4.
This commit is contained in:
@@ -153,7 +153,7 @@
|
||||
<!-- <param id="docker_sudo">false</param> -->
|
||||
<!-- Following option can be used to tweak sudo command used by
|
||||
default. -->
|
||||
<!-- <param id="docker_sudo_cmd">/usr/bin/sudo --extra_param</param> -->
|
||||
<!-- <param id="docker_sudo_cmd">/usr/bin/sudo -extra_param</param> -->
|
||||
<!-- By default, docker container will not have any networking
|
||||
enabled. host networking can be bridged by uncommenting next option
|
||||
http://docs.docker.io/reference/run/#network-settings
|
||||
|
||||
@@ -99,6 +99,12 @@ class ContainerFinder(object):
|
||||
return asbool(destination_info.get("%s_enabled" % container_type, False))
|
||||
|
||||
|
||||
class NullContainerFinder(object):
|
||||
|
||||
def find_container(self, tool_info, destination_info, job_info):
|
||||
return []
|
||||
|
||||
|
||||
class ContainerRegistry():
|
||||
|
||||
def __init__(self):
|
||||
|
||||
@@ -53,14 +53,14 @@ def parse_requirements_from_xml( xml_root ):
|
||||
... contents_document = '''<tool><requirements>%s</requirements></tool>'''
|
||||
... root = ElementTree.fromstring( contents_document % contents )
|
||||
... return parse_requirements_from_xml( root )
|
||||
>>> reqs = load_requirements('''<requirement>bwa</requirement>''')
|
||||
>>> reqs, containers = load_requirements('''<requirement>bwa</requirement>''')
|
||||
>>> reqs[0].name
|
||||
'bwa'
|
||||
>>> reqs[0].version is None
|
||||
True
|
||||
>>> reqs[0].type
|
||||
'package'
|
||||
>>> reqs = load_requirements('''<requirement type="binary" version="1.3.3">cufflinks</requirement>''')
|
||||
>>> reqs, containers = load_requirements('''<requirement type="binary" version="1.3.3">cufflinks</requirement>''')
|
||||
>>> reqs[0].name
|
||||
'cufflinks'
|
||||
>>> reqs[0].version
|
||||
|
||||
@@ -16,6 +16,7 @@ from galaxy.tools import Tool
|
||||
from galaxy.util import parse_xml
|
||||
from galaxy.util.dbkeys import GenomeBuilds
|
||||
from galaxy.jobs import NoopQueue
|
||||
from galaxy.tools.deps.containers import NullContainerFinder
|
||||
|
||||
|
||||
class UsesApp( object ):
|
||||
@@ -126,6 +127,7 @@ class MockApp( object ):
|
||||
self.security_agent = GalaxyRBACAgent( self.model )
|
||||
self.tool_data_tables = {}
|
||||
self.dataset_collections_service = None
|
||||
self.container_finder = NullContainerFinder()
|
||||
|
||||
|
||||
class MockContext(object):
|
||||
|
||||
Reference in New Issue
Block a user