Merge pull request #993 from consideRatio/pr/unit-test-24.04

ci: run unit tests in ubuntu-24.04 github actions environment as well
This commit is contained in:
Erik Sundell
2024-09-05 11:16:36 +02:00
committed by GitHub
2 changed files with 7 additions and 4 deletions

View File

@@ -46,6 +46,9 @@ jobs:
- name: "Ubuntu 22.04, Py 3.10" - name: "Ubuntu 22.04, Py 3.10"
ubuntu_version: "22.04" ubuntu_version: "22.04"
python_version: "3.10" python_version: "3.10"
- name: "Ubuntu 24.04, Py 3.12"
ubuntu_version: "24.04"
python_version: "3.12"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View File

@@ -147,8 +147,8 @@ def test_reload_hub():
"tljh.systemd.check_service_active" "tljh.systemd.check_service_active"
) as check_active, mock.patch("tljh.config.check_hub_ready") as check_ready: ) as check_active, mock.patch("tljh.config.check_hub_ready") as check_ready:
config.reload_component("hub") config.reload_component("hub")
assert restart_service.called_with("jupyterhub") restart_service.assert_called_with("jupyterhub")
assert check_active.called_with("jupyterhub") check_active.assert_called_with("jupyterhub")
def test_reload_proxy(tljh_dir): def test_reload_proxy(tljh_dir):
@@ -156,8 +156,8 @@ def test_reload_proxy(tljh_dir):
"tljh.systemd.check_service_active" "tljh.systemd.check_service_active"
) as check_active: ) as check_active:
config.reload_component("proxy") config.reload_component("proxy")
assert restart_service.called_with("traefik") restart_service.assert_called_with("traefik")
assert check_active.called_with("traefik") check_active.assert_called_with("traefik")
assert os.path.exists(os.path.join(config.STATE_DIR, "traefik.toml")) assert os.path.exists(os.path.join(config.STATE_DIR, "traefik.toml"))