Pulse/internal
rcourtman c1bf03fe39 fix: use proper Monitor constructor in PMG tests to initialize all maps
Fixes panic: assignment to entry in nil map in PMG polling tests.

**Problem:**
Tests were manually creating Monitor structs without initializing internal
maps like pollStatusMap, causing nil map panics when recordTaskResult()
tried to update task status.

**Root Cause:**
- TestPollPMGInstancePopulatesState (line 90)
- TestPollPMGInstanceRecordsAuthFailures (line 189)

Both created Monitor with only partial field initialization, missing:
- pollStatusMap
- dlqInsightMap
- instanceInfoCache
- Other internal state maps

**Solution:**
Changed both tests to use New() constructor which properly initializes all
maps and internal state (monitor.go:1541). This ensures tests match production
initialization and will automatically pick up any future map additions.

**Tests:**
 TestPollPMGInstancePopulatesState - now passes
 TestPollPMGInstanceRecordsAuthFailures - now passes
 All monitoring tests pass (0.125s)

Follows best practice: use constructors instead of manual struct creation
to maintain initialization invariants.
2025-10-20 15:22:23 +00:00
..
adapters Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
alerts security: complete Phase 1 sensor proxy hardening 2025-10-20 15:13:37 +00:00
api test: add X-RateLimit-Limit header regression test (#578) 2025-10-20 16:14:40 +01:00
auth Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
config feat: add professional logging with runtime configuration and performance optimization 2025-10-20 15:13:38 +00:00
crypto Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
discovery fix: improve discovery performance and reliability 2025-10-18 22:59:40 +00:00
dockeragent Docker agent: add arch-aware self-update download 2025-10-16 08:43:59 +00:00
errors Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
interfaces Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
logging feat: add professional logging with runtime configuration and performance optimization 2025-10-20 15:13:38 +00:00
mock Adjust backup and snapshot alert handling 2025-10-18 20:11:01 +00:00
models Adjust backup and snapshot alert handling 2025-10-18 20:11:01 +00:00
monitoring fix: use proper Monitor constructor in PMG tests to initialize all maps 2025-10-20 15:22:23 +00:00
notifications security: complete Phase 1 sensor proxy hardening 2025-10-20 15:13:37 +00:00
ssh/knownhosts security: complete Phase 1 sensor proxy hardening 2025-10-20 15:13:37 +00:00
tempproxy security: add resilience and error handling to tempproxy client 2025-10-19 16:37:11 +00:00
types Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
updates feat: implement updates rollback logic (Phase 1 follow-up) 2025-10-20 15:13:38 +00:00
utils Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
websocket refactor: use strconv.Itoa instead of string(rune()) in test 2025-10-20 15:12:14 +00:00