rcourtman
72af7bed5e
style: Apply gofmt to 37 files
...
Standardize code formatting across test files and monitor.go.
No functional changes.
2025-12-02 17:21:48 +00:00
rcourtman
80739cce94
test: Add rescheduleTask tests for monitoring package
...
Add comprehensive tests for the rescheduleTask function covering:
- Nil taskQueue handling (early return)
- Successful task outcome (regular rescheduling)
- Transient failure with backoff
- Non-transient failure routing to dead letter queue
- Exceeded retry attempts routing to dead letter queue
- No outcome uses default interval
- PBS and PMG instance type intervals
- Adaptive polling max interval capping
- Existing interval preservation
Coverage: rescheduleTask 32.1% → 58.9%
Coverage: monitoring package 52.8% → 53.5%
2025-12-02 12:38:50 +00:00
rcourtman
42e7359506
test: Add describeInstancesForScheduler tests
...
Add 6 tests for instance descriptor generation:
- No clients returns nil
- PVE only with sorted order
- PBS only
- PMG only
- All types combined
- Nil scheduler/stalenessTracker safety
Coverage: 60.7% → 62.5%
2025-12-02 02:11:14 +00:00
rcourtman
2d09c28129
test: Add recordTaskResult tests
...
Add 6 tests for polling task result recording:
- Nil monitor safety check
- Success case resets counters
- Failure case increments counters
- Consecutive failures tracking
- Success resets failure state
- Nil internal maps don't panic
Coverage: 53.7% → 97.6%
2025-12-02 02:06:08 +00:00
rcourtman
5a6c6091bf
Honor configured PVE polling interval in scheduler
2025-11-20 22:00:56 +00:00