Add tests for per user memory limit

This commit is contained in:
Tim Head
2018-10-15 16:03:31 +02:00
parent cff22b5b5c
commit c67f34daca

View File

@@ -59,6 +59,22 @@ def apply_mock_config(overrides):
return c return c
def test_default_memory_limit():
"""
Test default per user memory limit
"""
c = apply_mock_config({})
assert c.SystemdSpawner.mem_limit is None
def test_set_memory_limit():
"""
Test setting per user memory limit
"""
c = apply_mock_config({'limits': {'memory': '42G'}})
assert c.SystemdSpawner.mem_limit == '42G'
def test_app_default(): def test_app_default():
""" """
Test default application with no config overrides. Test default application with no config overrides.