mirror of https://github.com/docker/docker-py.git
Add integration test for CPU realtime options
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
d7bc8ac2b8
commit
445cb18723
|
|
@ -464,6 +464,20 @@ class CreateContainerTest(BaseAPIIntegrationTest):
|
||||||
config = self.client.inspect_container(ctnr)
|
config = self.client.inspect_container(ctnr)
|
||||||
assert config['HostConfig']['InitPath'] == "/usr/libexec/docker-init"
|
assert config['HostConfig']['InitPath'] == "/usr/libexec/docker-init"
|
||||||
|
|
||||||
|
@requires_api_version('1.24')
|
||||||
|
@pytest.mark.xfail(not os.path.exists('/sys/fs/cgroup/cpu.rt_runtime_us'),
|
||||||
|
reason='CONFIG_RT_GROUP_SCHED isn\'t enabled')
|
||||||
|
def test_create_with_cpu_rt_options(self):
|
||||||
|
ctnr = self.client.create_container(
|
||||||
|
BUSYBOX, 'true', host_config=self.client.create_host_config(
|
||||||
|
cpu_rt_period=1000, cpu_rt_runtime=500
|
||||||
|
)
|
||||||
|
)
|
||||||
|
self.tmp_containers.append(ctnr)
|
||||||
|
config = self.client.inspect_container(ctnr)
|
||||||
|
assert config['HostConfig']['CpuRealtimeRuntime'] == 500
|
||||||
|
assert config['HostConfig']['CpuRealtimePeriod'] == 1000
|
||||||
|
|
||||||
|
|
||||||
class VolumeBindTest(BaseAPIIntegrationTest):
|
class VolumeBindTest(BaseAPIIntegrationTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue