aboutsummaryrefslogtreecommitdiff
path: root/hotline/client_connect_test.go
AgeCommit message (Collapse)Author
2026-07-10Add tests for connection login sequence and client networkingJeff Halter
Cover the two biggest untested plumbing paths in the hotline package: - handleNewConnection (server login sequence): 3.2% -> 79.6%, via a scripted in-memory ReadWriteCloser that feeds handshake + login bytes and captures replies. Covers successful 1.5+ and legacy 1.2.3 flows, no-agreement access, incorrect login, banned username, and banned IP. - Client Connect/HandleTransactions/keepalive: 0% -> 83-93%, via a loopback TCP server for Connect and preloaded mock conns for the transaction loop and keepalive shutdown.