commit
1648a3e257
6 changed files with 53 additions and 1 deletions
|
|
@ -867,6 +867,14 @@ class ServiceTest(DockerClientTestCase):
|
|||
container = create_and_start_container(service)
|
||||
self.assertEqual(container.get('HostConfig.OomScoreAdj'), 500)
|
||||
|
||||
def test_group_add_value(self):
|
||||
service = self.create_service('web', group_add=["root", "1"])
|
||||
container = create_and_start_container(service)
|
||||
|
||||
host_container_groupadd = container.get('HostConfig.GroupAdd')
|
||||
self.assertTrue("root" in host_container_groupadd)
|
||||
self.assertTrue("1" in host_container_groupadd)
|
||||
|
||||
def test_restart_on_failure_value(self):
|
||||
service = self.create_service('web', restart={
|
||||
'Name': 'on-failure',
|
||||
|
|
|
|||
|
|
@ -1289,6 +1289,26 @@ class ConfigTest(unittest.TestCase):
|
|||
}
|
||||
]
|
||||
|
||||
def test_group_add_option(self):
|
||||
|
||||
actual = config.load(build_config_details({
|
||||
'version': '2',
|
||||
'services': {
|
||||
'web': {
|
||||
'image': 'alpine',
|
||||
'group_add': ["docker", 777]
|
||||
}
|
||||
}
|
||||
}))
|
||||
|
||||
assert actual.services == [
|
||||
{
|
||||
'name': 'web',
|
||||
'image': 'alpine',
|
||||
'group_add': ["docker", 777]
|
||||
}
|
||||
]
|
||||
|
||||
def test_merge_service_dicts_from_files_with_extends_in_base(self):
|
||||
base = {
|
||||
'volumes': ['.:/app'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue