Merge pull request #1932 from mrfuxi/image-dockerfile-validation
Do not allow to specify both image and dockerfile in configuration.
This commit is contained in:
commit
f5d73fee57
4 changed files with 26 additions and 1 deletions
|
|
@ -191,6 +191,17 @@ class ConfigTest(unittest.TestCase):
|
|||
)
|
||||
)
|
||||
|
||||
def test_config_image_and_dockerfile_raise_validation_error(self):
|
||||
expected_error_msg = "Service 'web' has both an image and alternate Dockerfile."
|
||||
with self.assertRaisesRegexp(ConfigurationError, expected_error_msg):
|
||||
config.load(
|
||||
config.ConfigDetails(
|
||||
{'web': {'image': 'busybox', 'dockerfile': 'Dockerfile.alt'}},
|
||||
'working_dir',
|
||||
'filename.yml'
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
class InterpolationTest(unittest.TestCase):
|
||||
@mock.patch.dict(os.environ)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue