Merge pull request #2655 from shin-/updated_volume_definition
Properly validate volume definition
This commit is contained in:
commit
dbe04a70f0
3 changed files with 44 additions and 23 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue