Config package has only 23% test coverage #72
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The
internal/configpackage has 23% test coverage. OnlyClassifyTargets()and related PSL logic are tested. The main configuration loading path is untested.What is Untested
New()— the main config constructorbuildConfig()— reading from Viper, interval parsing, fallback defaultssetupViper()— env prefix binding, default valuesparseCSV()— CSV string parsingconfigureDebugLogging()— debug mode activationStatePath()— path constructionDNSWATCHER_DNS_INTERVAL=banana)Why This Matters
Configuration is the user's primary interface to the daemon. Untested config paths mean:
Recommendation
Add tests covering:
parseCSVedge cases (trailing commas, whitespace, empty strings)StatePathreturns expected pathCategory
Nice-to-have for 1.0. The config code is simple and works correctly in practice, but should be tested before claiming production readiness.
Closing: completed by PR #81 (merged).