From 3f180a939fd1fc675198d0d95db76e333d3a0f2b Mon Sep 17 00:00:00 2001 From: stevejpurves Date: Mon, 20 Mar 2023 17:32:24 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20add=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_configurer.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tests/test_configurer.py b/tests/test_configurer.py index 18586bf..e2f5179 100644 --- a/tests/test_configurer.py +++ b/tests/test_configurer.py @@ -193,6 +193,32 @@ def test_cull_service_default(): } ] +def test_cull_service_named(): + """ + Test default cull service settings with named server removal + """ + c = apply_mock_config( + {"services": {"cull": {"every": 10, "remove_named_servers": True, "max_age": 60}}} + ) + + cull_cmd = [ + sys.executable, + "-m", + "jupyterhub_idle_culler", + "--timeout=600", + "--cull-every=10", + "--concurrency=5", + "--max-age=60", + "--remove-named-servers", + ] + assert c.JupyterHub.services == [ + { + "name": "cull-idle", + "admin": True, + "command": cull_cmd, + } + ] + def test_set_cull_service(): """