Error when the project name is invalid for the image name.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2016-01-14 13:28:53 -05:00
commit b98e2169e6
2 changed files with 19 additions and 0 deletions

View file

@ -544,6 +544,13 @@ class ConfigTest(unittest.TestCase):
)
)
def test_load_errors_on_uppercase_with_no_image(self):
with pytest.raises(ConfigurationError) as exc:
config.load(build_config_details({
'Foo': {'build': '.'},
}, 'tests/fixtures/build-ctx'))
assert "Service 'Foo' contains uppercase characters" in exc.exconly()
def test_invalid_config_build_and_image_specified(self):
expected_error_msg = "Service 'foo' has both an image and build path specified."
with self.assertRaisesRegexp(ConfigurationError, expected_error_msg):