Add support for "isolation" in config

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2016-09-28 15:31:58 -07:00
commit dc8a39f70d
4 changed files with 72 additions and 3 deletions

View file

@ -351,7 +351,7 @@ class ConfigTest(unittest.TestCase):
base_file = config.ConfigFile(
'base.yaml',
{
'version': '2.1',
'version': V2_1,
'services': {
'web': {
'image': 'example/web',
@ -1330,7 +1330,7 @@ class ConfigTest(unittest.TestCase):
'image': 'alpine',
'group_add': ["docker", 777]
}
}
}
}))
assert actual.services == [
@ -1341,6 +1341,25 @@ class ConfigTest(unittest.TestCase):
}
]
def test_isolation_option(self):
actual = config.load(build_config_details({
'version': V2_1,
'services': {
'web': {
'image': 'win10',
'isolation': 'hyperv'
}
}
}))
assert actual.services == [
{
'name': 'web',
'image': 'win10',
'isolation': 'hyperv',
}
]
def test_merge_service_dicts_from_files_with_extends_in_base(self):
base = {
'volumes': ['.:/app'],