diff options
author | Joffrey F <joffrey@docker.com> | 2016-08-23 17:05:08 -0700 |
---|---|---|
committer | Joffrey F <joffrey@docker.com> | 2016-08-23 17:05:08 -0700 |
commit | 902c7a76ccf23e2e210e982cc832a2770cfc99f4 (patch) | |
tree | 2b7706ba369e1f8be031c7bd2f0044cf131121ca /tests | |
parent | bf2235bc12254bc989819b44fb06a99e63a2adf7 (diff) | |
download | docker-py-aiden0z-master.tar.gz |
Docs and tests for pids_limit.aiden0z-master
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/utils_test.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/utils_test.py b/tests/unit/utils_test.py index 3476f04..2a2759d 100644 --- a/tests/unit/utils_test.py +++ b/tests/unit/utils_test.py @@ -185,6 +185,15 @@ class HostConfigTest(base.BaseTestCase): InvalidVersion, lambda: create_host_config( version='1.20', kernel_memory=67108864)) + def test_create_host_config_with_pids_limit(self): + config = create_host_config(version='1.23', pids_limit=1024) + self.assertEqual(config.get('PidsLimit'), 1024) + + with pytest.raises(InvalidVersion): + create_host_config(version='1.22', pids_limit=1024) + with pytest.raises(TypeError): + create_host_config(version='1.22', pids_limit='1024') + class UlimitTest(base.BaseTestCase): def test_create_host_config_dict_ulimit(self): |