Commit Graph
3 Commits
Author SHA1 Message Date
Veer Singh 403ffc8755 Tighten monitor tests from review suggestions
Assert event severity literally instead of through the production helper.
Check that Stop closes the plugin result channel.
Run monitorLoop directly so the test observes its return.
Assert the initial condition transition times.
2026-08-05 00:30:36 -07:00
Veer Singh ba3a2d858b Add unit tests for the custom plugin monitor
This change adds tests for generateStatus, the monitor lifecycle and the
metrics path. Package coverage increases from 0.8% to 95.3% of statements.

A table test replays sequences of plugin results against one monitor. The
table covers the five condition scenarios in generateStatus. Other tests
cover the temporary rule path, the problem counter, the problem gauge and
the constructor.

This change adds no production code.
2026-07-28 21:53:20 -07:00
Xuewei Zhang a07176073a Add existing monitors into the problem daemon registration hook. 2019-06-13 00:51:17 -07:00