Skip to content

Commit

Permalink
Merge pull request #993 from consideRatio/pr/unit-test-24.04
Browse files Browse the repository at this point in the history
ci: run unit tests in ubuntu-24.04 github actions environment as well
  • Loading branch information
consideRatio authored Sep 5, 2024
2 parents 73f8833 + b034fc6 commit f7118ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
- name: "Ubuntu 22.04, Py 3.10"
ubuntu_version: "22.04"
python_version: "3.10"
- name: "Ubuntu 24.04, Py 3.12"
ubuntu_version: "24.04"
python_version: "3.12"

steps:
- uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,17 @@ def test_reload_hub():
"tljh.systemd.check_service_active"
) as check_active, mock.patch("tljh.config.check_hub_ready") as check_ready:
config.reload_component("hub")
assert restart_service.called_with("jupyterhub")
assert check_active.called_with("jupyterhub")
restart_service.assert_called_with("jupyterhub")
check_active.assert_called_with("jupyterhub")


def test_reload_proxy(tljh_dir):
with mock.patch("tljh.systemd.restart_service") as restart_service, mock.patch(
"tljh.systemd.check_service_active"
) as check_active:
config.reload_component("proxy")
assert restart_service.called_with("traefik")
assert check_active.called_with("traefik")
restart_service.assert_called_with("traefik")
check_active.assert_called_with("traefik")
assert os.path.exists(os.path.join(config.STATE_DIR, "traefik.toml"))


Expand Down

0 comments on commit f7118ed

Please sign in to comment.