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:
Karol Duleba 2015-08-26 22:03:45 +01:00
commit 477d4f491d
4 changed files with 26 additions and 1 deletions

View file

@ -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)