filename is not optional
While it can be set to ultimately a value of None, when a config file is read in from stdin, it is not optional. We kinda make use of it's ability to be set to None in our tests but functionally and design wise, it is required. If filename is not set, extends does not work. Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
This commit is contained in:
parent
c907f35e74
commit
1344533b24
3 changed files with 4 additions and 4 deletions
|
|
@ -31,7 +31,7 @@ class DockerClientTestCase(unittest.TestCase):
|
|||
if 'command' not in kwargs:
|
||||
kwargs['command'] = ["top"]
|
||||
|
||||
options = ServiceLoader(working_dir='.').make_service_dict(name, kwargs)
|
||||
options = ServiceLoader(working_dir='.', filename=None).make_service_dict(name, kwargs)
|
||||
|
||||
labels = options.setdefault('labels', {})
|
||||
labels['com.docker.compose.test-name'] = self.id()
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ from compose.config import config
|
|||
from compose.config.errors import ConfigurationError
|
||||
|
||||
|
||||
def make_service_dict(name, service_dict, working_dir):
|
||||
def make_service_dict(name, service_dict, working_dir, filename=None):
|
||||
"""
|
||||
Test helper function to construct a ServiceLoader
|
||||
"""
|
||||
return config.ServiceLoader(working_dir=working_dir).make_service_dict(name, service_dict)
|
||||
return config.ServiceLoader(working_dir=working_dir, filename=filename).make_service_dict(name, service_dict)
|
||||
|
||||
|
||||
def service_sort(services):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue