Added support for cgroup_parent
This change adds cgroup-parent support to compose project. It allows each service to specify a 'cgroup_parent' option. Signed-off-by: Mohit Soni <mosoni@paypal.com>
This commit is contained in:
parent
26ff729696
commit
f4efa29377
5 changed files with 19 additions and 1 deletions
|
|
@ -353,6 +353,13 @@ class ServiceTest(unittest.TestCase):
|
|||
service.create_container(do_build=False)
|
||||
self.assertFalse(self.mock_client.build.called)
|
||||
|
||||
def test_create_container_no_build_cgroup_parent(self):
|
||||
service = Service('foo', client=self.mock_client, build='.')
|
||||
service.image = lambda: {'Id': 'abc123'}
|
||||
|
||||
service.create_container(do_build=False, cgroup_parent='test')
|
||||
self.assertFalse(self.mock_client.build.called)
|
||||
|
||||
def test_create_container_no_build_but_needs_build(self):
|
||||
service = Service('foo', client=self.mock_client, build='.')
|
||||
service.image = lambda *args, **kwargs: mock_get_image([])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue