Orchestrata Ultimate › Tests › Reference › scripts › test_swarm_supervisor

Tests reference — tests/scripts/test_swarm_supervisor.py

Module of tests/scripts, split out because the directory page would be too large.

Prose pending.

tests/scripts/test_swarm_supervisor.py

source · 23 tests · 527 lines

Tests for scripts/swarm_supervisor.py — heartbeat supervision for

Kind Name Line Description
function test_compute_heartbeat_reflects_last_commit_time 96
function test_compute_heartbeat_advances_after_new_commit 111
function test_compute_heartbeat_raises_for_missing_worktree 120
function test_compute_heartbeat_raises_for_non_git_directory 126
function test_compute_heartbeat_works_before_first_commit 134 An initialized-but-empty repo has no commits yet -- HEAD/index mtime
function test_compute_heartbeat_skips_a_tracked_file_deleted_on_disk 145 A file git add-staged then removed from disk (without git rm) is
function test_compute_heartbeat_paths_bounds_the_tracked_file_scan 161 Regression for F11: paths= bounds the tracked-file mtime scan to
function test_compute_heartbeat_forces_real_timeout_expired 196 Regression seam for F11: timeout= is threaded straight into every
function test_watch_lifecycle_stall_rearm_no_duplicate 212 now= fakes the passage of time for the STALL comparison, but
function test_unwatch_removes_and_reports_existence 255
function test_read_state_recovers_from_corrupt_json 263
function test_read_state_recovers_from_non_dict_json 270
function test_run_check_records_error_for_bad_worktree 277
function test_run_check_survives_a_real_git_timeout_and_still_writes_state 289 Regression for F11: a genuine subprocess.TimeoutExpired (or any
function test_format_status_lists_watch_and_stall_state 327
function test_format_status_empty_state 339
function test_send_irc_line_delivers_privmsg 390
function test_run_check_sends_irc_alarm_on_stall 398
function test_run_check_survives_a_real_irc_connection_failure 417 An IRC send failure (nothing listening) must not prevent the alert
function test_cli_watch_check_status_unwatch 463
function test_cli_check_ok_when_recently_committed 497
function test_cli_watch_requires_stall_flag 516
function test_cli_status_empty_state 524