Do not allow to specify both image and dockerfile in configuration. Closes #1908
Signed-off-by: Karol Duleba <mr.fuxi@gmail.com>
This commit is contained in:
parent
ecd1cc31dc
commit
477d4f491d
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