diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-08 06:17:31 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-08 06:17:31 -0500 |
| commit | bef70537fec8532f8f71c46e7f63ea09dcbd6bfb (patch) | |
| tree | 859fa143c8159ce97b2f6a38c5536701c3f9da55 /tests/installer-steps/test_orchestrators.py | |
| parent | af5a27e1a0b374a932f4ad6c5e2ff5fbf53791ff (diff) | |
| download | archsetup-bef70537fec8532f8f71c46e7f63ea09dcbd6bfb.tar.gz archsetup-bef70537fec8532f8f71c46e7f63ea09dcbd6bfb.zip | |
feat(install): install maintenance thresholds and enable maint timers
The maint console and the system-health-check workflow grade against ~/.config/archsetup/maintenance-thresholds.toml, but nothing installed it. A fresh install got a working maint CLI and no thresholds file.
user_customizations now installs the shipped TOML from the cloned repo. A re-run refreshes it, and the user layer in ~/.config/maint/ is never touched, so a reinstall can't eat curation. It also enables maint-scan.timer and maint-net-scan.timer through wants-symlinks (systemctl --user has no session bus during install, the syncthing idiom). Timer enablement is hyprland-only because the units live in that stow tier.
The install lists gain the runtime tools the probes call but nothing carried: expac, lm_sensors, fwupd.
Diffstat (limited to 'tests/installer-steps/test_orchestrators.py')
| -rw-r--r-- | tests/installer-steps/test_orchestrators.py | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/tests/installer-steps/test_orchestrators.py b/tests/installer-steps/test_orchestrators.py index 48b7508..2a771ba 100644 --- a/tests/installer-steps/test_orchestrators.py +++ b/tests/installer-steps/test_orchestrators.py @@ -51,7 +51,8 @@ ORCHESTRATORS = { "user_customizations": [ "clone_user_repos", "stow_dotfiles", "prune_waybar_battery", "refresh_desktop_caches", "configure_dconf_defaults", - "finalize_dotfiles", "create_user_directories", + "finalize_dotfiles", "install_maintenance_config", + "create_user_directories", ], } @@ -114,5 +115,35 @@ class SnapshotDispatch(unittest.TestCase): self.assertEqual(result.stdout.split(), []) +class MaintenanceConfigDispatch(unittest.TestCase): + """install_maintenance_config branches on desktop_env; pin each branch. + + The thresholds TOML installs for every environment (the CLI works + headless); the scan timers are user units in the hyprland stow tier, so + their enablement is hyprland-only. + """ + + SUBS = ["install_maintenance_thresholds", "enable_maint_timers"] + + def test_hyprland_installs_thresholds_and_enables_timers(self): + result = run_orchestrator( + "install_maintenance_config", self.SUBS, + extra_defs='desktop_env=hyprland', + ) + self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual(result.stdout.split(), self.SUBS) + + def test_non_hyprland_installs_thresholds_only(self): + for env in ("dwm", "none"): + with self.subTest(desktop_env=env): + result = run_orchestrator( + "install_maintenance_config", self.SUBS, + extra_defs=f'desktop_env={env}', + ) + self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual(result.stdout.split(), + ["install_maintenance_thresholds"]) + + if __name__ == "__main__": unittest.main() |
