Merge pull request #2655 from shin-/updated_volume_definition

Properly validate volume definition
This commit is contained in:
Aanand Prasad 2016-01-14 16:37:39 +00:00
commit dbe04a70f0
3 changed files with 44 additions and 23 deletions

View file

@ -112,6 +112,23 @@ class ConfigTest(unittest.TestCase):
}
})
def test_named_volume_config_empty(self):
config_details = build_config_details({
'version': 2,
'services': {
'simple': {'image': 'busybox'}
},
'volumes': {
'simple': None,
'other': {},
}
})
config_result = config.load(config_details)
volumes = config_result.volumes
assert 'simple' in volumes
assert volumes['simple'] == {}
assert volumes['other'] == {}
def test_load_service_with_name_version(self):
config_data = config.load(
build_config_details({