From 4bf6033e8e13c3e435ddb37a266d6c66d814b626 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 28 Jun 2026 01:51:52 -0400 Subject: test(vm): assert the live-update guard + hook are installed --- scripts/testing/tests/test_desktop.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'scripts') diff --git a/scripts/testing/tests/test_desktop.py b/scripts/testing/tests/test_desktop.py index 53e54e1..c02d2b6 100644 --- a/scripts/testing/tests/test_desktop.py +++ b/scripts/testing/tests/test_desktop.py @@ -49,6 +49,19 @@ def test_hyprland_config_present(host, hyprland_installed, home, rel): assert host.file("%s/%s" % (home, rel)).exists, "%s missing" % rel +@pytest.mark.attribution("archsetup") +def test_live_update_guard_installed(host, hyprland_installed): + if not hyprland_installed: + pytest.skip("Hyprland not installed (DESKTOP_ENV != hyprland)") + guard = host.file("/usr/local/bin/hypr-live-update-guard") + assert guard.exists, "live-update guard script missing" + assert guard.mode & 0o111, "live-update guard not executable" + hook = host.file("/etc/pacman.d/hooks/hypr-live-update-guard.hook") + assert hook.exists, "live-update guard pacman hook missing" + assert "hypr-live-update-guard" in hook.content_string, \ + "hook does not invoke the guard script" + + @pytest.mark.attribution("archsetup") def test_portal_settings_backend_not_disabled(host, hyprland_installed, home): if not hyprland_installed: -- cgit v1.2.3