v1.5.0
Testing
This release is primarily a testing overhaul, bringing project coverage from minimal to ~46% with a solid foundation across all major layers.
Infrastructure
- Introduced
sqlc.Querierinterface indb.Store, enabling mock-based testing of the database layer without a real PostgreSQL connection - Added
gomock-generated mock forsqlc.Querieratdb/sqlc/mock - Converted
stubReaderin handlers tests to a configurable struct with function fields, eliminating the need for a separatefuncReadertype - CI coverage filtering now correctly excludes generated code (
db/sqlc,docs,iatadb/gen) for accurate badge reporting
Coverage by package
db— store mapping logic, pagination, nil pointer handling, conditional field mapping, type conversions across channels, observers, nodes, packets, traces, routes, scopes, stats, and IATAsinternal/api/handlers— validation paths and happy paths across all handlers including messages, packets, observers, nodes, stats, routes, scopes, and tracesinternal/cache—getOrSetcache hit/miss/error/corrupt-entry behaviour, TTL resolution fallback chain, node and observer invalidationinternal/config— YAML loading, config seeding, default resolution extracted into testableResolvefunctioninternal/hub— full runtime behaviour including broadcast, subscription lifecycle, lagged notification, OR-scope semanticsinternal/ingest— pure function coverage for payload parsing, transport code derivation, capability detection, observer type normalisationinternal/keystore— key derivation, fingerprinting, store lookup,EntryExists(moved frommain)internal/scopestore— load, replace, copy-on-read semanticsinternal/background— scheduler task execution and context cancellationinternal/ws— IP limiter acquire/release/cleanup logic
Refactoring
config.Resolve()extracted frommain.goto derive runtime defaults with fallback chain — now tested and used at startupkeystore.EntryExists()moved frommain.gointo the keystore package where it belongs
Full Changelog: v1.4.1...v1.5.0