def test_process_with_local_config(): c = YamlConfig(source='{"nginx": {"image": "bar"}, "---": {"commands": {"bar": ["foo"]}}}') flexmock(c) c.should_receive('process_local_config').once().with_args({"commands": {"bar": ["foo"]}}) c.load(process=False)
def test_process_with_local_config(): c = YamlConfig( source= '{"nginx": {"image": "bar"}, "---": {"commands": {"bar": ["foo"]}}}') flexmock(c) c.should_receive('process_local_config').once().with_args( {"commands": { "bar": ["foo"] }}) c.load(process=False)
def test_process_with_app_name(): c = YamlConfig() flexmock(c) c.should_receive('process_image_build').once() c.should_receive('process_volumes_build').once() c.should_receive('process_command_build').once() c.process({'nginx': {'foo': 'bar'}}, path='foo', app_name='myapp') assert isinstance(c.services['nginx.myapp'], Service) assert c.services['nginx.myapp'].name == 'nginx.myapp'
def test_process_with_app_name(): c = YamlConfig() flexmock(c) c.should_receive('process_image_build').once() c.should_receive('process_volumes_build').once() c.should_receive('process_command_build').once() c.process({ 'nginx': {'foo': 'bar'} }, path='foo', app_name='myapp') assert isinstance(c.services['nginx.myapp'], Service) assert c.services['nginx.myapp'].name == 'nginx.myapp'