Implement ability to specify external volumes
External volumes are created and managed by the user. They are not namespaced. They are expected to exist at the beginning of the up phase. Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
05935b5e54
commit
9cb58b796e
6 changed files with 93 additions and 21 deletions
|
|
@ -775,6 +775,24 @@ class ConfigTest(unittest.TestCase):
|
|||
'extends': {'service': 'foo'}
|
||||
}
|
||||
|
||||
def test_external_volume_config(self):
|
||||
config_details = build_config_details({
|
||||
'version': 2,
|
||||
'services': {
|
||||
'bogus': {'image': 'busybox'}
|
||||
},
|
||||
'volumes': {
|
||||
'ext': {'external': True},
|
||||
'ext2': {'external': {'name': 'aliased'}}
|
||||
}
|
||||
})
|
||||
config_result = config.load(config_details)
|
||||
volumes = config_result.volumes
|
||||
assert 'ext' in volumes
|
||||
assert volumes['ext']['external'] is True
|
||||
assert 'ext2' in volumes
|
||||
assert volumes['ext2']['external']['name'] == 'aliased'
|
||||
|
||||
|
||||
class PortsTest(unittest.TestCase):
|
||||
INVALID_PORTS_TYPES = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue