aboutsummaryrefslogtreecommitdiff
path: root/tests/installer-steps/test_orchestrators.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/installer-steps/test_orchestrators.py')
-rw-r--r--tests/installer-steps/test_orchestrators.py33
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()