217f85fbdd
speed up tests and update dependencies
...
- Override wsHandshakeTimeout in 3 websocket tests that waited 30s each
- Make initialRetryDelay a package variable for faster retry tests
- Reduce time.Sleep calls across agent_test.go (1.5s->150ms, 3s->1s, etc.)
- Update Makefile with test-fast and test-short targets, add -count=1
- Update golang.org/x/crypto, x/net, x/sys to latest minors
- Fix TestWSDialDefaultPorts to use mocked dials instead of real TCP
2026-06-06 13:50:54 -05:00
6bf9584cb2
test: push coverage from 92% to 97.6% (249 tests)
...
Refactor main.go to extract testable runMain() function, make
icmpListenPacket and syscallExec injectable, fix worker pool tests
to properly fill queue buffers (n*4 capacity). Add comprehensive
tests for CLI argument parsing, ping exec fallback, ICMP timeout
paths, self-update happy path, and SNMP context cancellation.
2026-03-04 16:35:02 -06:00
aef770ea83
test: achieve 92%+ coverage with comprehensive integration and edge case tests
...
Cover WebSocket session lifecycle (result channels, SNMP batch flushing,
heartbeats, restart), MikroTik TLS TOFU verification mismatch, worker pool
exhaustion, plaintext WebSocket rejection, HTTP/TCP/DNS check execution,
IPv4 fallback, and customer network edge cases.
Make heartbeat intervals and toWebSocketURL exit injectable for testing.
2026-03-04 16:06:29 -06:00
4e6dd45415
use raw ICMP ping with exec fallback for unprivileged environments
2026-02-12 10:02:54 -06:00
894dcb18e4
skip ping test when raw sockets unavailable
2026-02-11 10:54:15 -06:00
a36a2b7fd7
increase test coverage and improve logger output
2026-02-11 10:42:19 -06:00
769ac1f623
Full rewrite in golang
2026-02-11 10:04:30 -06:00