test(monitor): add comprehensive test suite for engine and checkers

55 tests covering state machine transitions, heartbeat handling, push
deadline checks, group aggregation, history recording, probe aggregation,
log management, state management, and concurrency safety.

Checker tests cover HTTP (via httptest), port (via net.Listen),
isCodeAccepted ranges, and siteTimeout defaults. Ping and DNS
checkers skipped (need ICMP privileges and DNS server).

Coverage: 64.2% overall, 100% on handleStatusChange, triggerAlert,
checkPush, recordCheck, and AggregateStatus.
This commit is contained in:
2026-05-23 21:06:28 -04:00
parent 4b5495fb49
commit 94296e8286
2 changed files with 1247 additions and 0 deletions
File diff suppressed because it is too large Load Diff