Add cpu_shares option in fig.yml

This options maps exactly the docker run option with the same name.

Signed-off-by: Christophe Labouisse <christophe@labouisse.org>
This commit is contained in:
Christophe Labouisse 2015-01-11 19:58:08 +01:00
commit aa0c43df96
3 changed files with 11 additions and 1 deletions

View file

@ -100,6 +100,12 @@ class ServiceTest(DockerClientTestCase):
service.start_container(container)
self.assertIn('/var/db', container.inspect()['Volumes'])
def test_create_container_with_cpu_shares(self):
service = self.create_service('db', cpu_shares=73)
container = service.create_container()
service.start_container(container)
self.assertEqual(container.inspect()['Config']['CpuShares'], 73)
def test_create_container_with_specified_volume(self):
host_path = '/tmp/host-path'
container_path = '/container-path'