Orchestrata Ultimate › Tests › Reference › scripts › test_health_check
Tests reference — tests/scripts/test_health_check.py
Module of tests/scripts, split out because the directory page would be too large.
Prose pending.
tests/scripts/test_health_check.py
source · 46 tests · 738 lines
Tests for scripts/health_check.py — the single entry point for all
| Kind | Name | Line | Description |
|---|---|---|---|
| function | test_run_missing_executable_returns_127 |
76 | |
| function | test_run_timeout_returns_124 |
84 | |
| function | test_run_success_returns_stdout |
93 | |
| function | test_check_ruff_clean_tree_passes |
103 | |
| function | test_check_ruff_dirty_tree_fails_with_prefixed_lines |
113 | |
| function | test_check_ruff_fix_true_rewrites_file |
123 | |
| function | test_check_syntax_clean_tree_passes |
136 | |
| function | test_check_syntax_broken_src_and_tests_reports_both |
146 | |
| function | test_check_architecture_pass |
164 | |
| function | test_check_architecture_fail |
173 | |
| function | test_check_orphan_modules_pass |
186 | |
| function | test_check_orphan_modules_fail |
195 | |
| function | test_check_orphan_modules_missing_baseline_fails |
208 | The real subcommand exits 2 (not 0/1) when the baseline is missing; |
| function | test_check_validate_ci_pass |
223 | |
| function | test_check_validate_ci_fail |
232 | |
| function | test_check_test_purity_pass_when_no_error_or_fail_words |
245 | |
| function | test_check_test_purity_fail_keeps_the_violation_detail |
258 | A failing audit fails the check and KEEPS its violation citations. |
| function | test_check_test_purity_fails_on_nonzero_exit_without_error_words |
285 | REGRESSION (2026-08-05): check_test_purity grades the audit's EXIT |
| function | test_check_test_purity_passes_on_zero_exit_despite_error_words |
307 | The other half of the same contract: text is not the grade. An audit |
| function | test_check_prolog_meta_lint_passes_on_clean_stub |
325 | |
| function | test_check_prolog_meta_lint_fails_and_prefixes_lines |
334 | |
| function | test_check_env_loaded_passes_with_all_vars_present |
352 | |
| function | test_check_env_loaded_fails_when_var_missing |
360 | check_env_loaded() reads os.environ at call time, so the injection |
| function | test_check_hardcoded_ips_clean_tree_passes |
391 | |
| function | test_check_hardcoded_ips_flags_bare_ip |
401 | |
| function | test_check_hardcoded_ips_flags_prod_ip_default_in_env_read |
410 | |
| function | test_check_hardcoded_ips_scans_scripts_dir |
427 | |
| function | test_check_hardcoded_ips_skips_generated_files |
442 | |
| function | test_check_hardcoded_ips_flags_single_quoted_ip |
451 | |
| function | test_check_pytest_skip_true_short_circuits |
463 | |
| function | test_check_pytest_skip_false_passes_on_tiny_clean_suite |
470 | |
| function | test_check_pytest_skip_false_fails_on_broken_test |
479 | |
| function | test_main_fast_mode_skips_test_purity_and_pytest |
529 | |
| function | test_main_default_mode_includes_test_purity_not_pytest |
538 | |
| function | test_main_ci_mode_includes_pytest_and_passes |
547 | |
| function | test_main_registers_every_ruling_enforcement_gate |
555 | RUL-023: a gate that exists but is never invoked is not a delivery. |
| function | test_ruling_gate_failure_fails_the_health_check |
577 | Each ruling gate is BLOCKING: a non-zero gate exit must fail the run |
| function | test_main_dirty_sandbox_fails_and_lists_errors |
591 | |
| function | test_main_fix_flag_passed_through_to_check_ruff |
599 | |
| function | test_main_more_than_50_errors_truncates_listing |
618 | |
| function | test_check_systemd_units_passes_when_installed_copies_match |
642 | |
| function | test_check_systemd_units_fails_on_an_edited_installed_unit |
659 | |
| function | test_check_systemd_units_fails_when_a_declared_unit_is_not_installed |
677 | |
| function | test_check_systemd_units_skips_when_the_host_has_no_user_unit_dir |
692 | A container/CI host has no user units — the gate must be a no-op there, |
| function | test_check_systemd_units_skips_when_deploy_systemd_is_absent |
709 | |
| function | test_check_systemd_units_ignores_non_unit_files |
723 | README.md and install.sh live in deploy/systemd too; only .service and |