mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
💚 green tests
This commit is contained in:
committed by
Erik Sundell
parent
3f180a939f
commit
836056f404
@@ -193,33 +193,6 @@ 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():
|
def test_set_cull_service():
|
||||||
"""
|
"""
|
||||||
Test setting cull service options
|
Test setting cull service options
|
||||||
@@ -245,6 +218,32 @@ def test_set_cull_service():
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def test_cull_service_named():
|
||||||
|
"""
|
||||||
|
Test default cull service settings with named server removal
|
||||||
|
"""
|
||||||
|
c = apply_mock_config(
|
||||||
|
{"services": {"cull": {"every": 10, "cull_users": True, "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",
|
||||||
|
"--cull-users",
|
||||||
|
"--remove-named-servers",
|
||||||
|
]
|
||||||
|
assert c.JupyterHub.services == [
|
||||||
|
{
|
||||||
|
"name": "cull-idle",
|
||||||
|
"admin": True,
|
||||||
|
"command": cull_cmd,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
def test_load_secrets(tljh_dir):
|
def test_load_secrets(tljh_dir):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user