Technical notes on web development, DevOps, and AI integration.
1 article
Moving tests to a centralized tree makes per-package coverage read zero percent; one -coverpkg flag on the coverage mode restores the number.
TL;DR: Moving Go tests into a centralized external package caused coverage to drop to 0.0% even though everything still passes, because go test only instruments the package under test by default. The fix is the -coverpkg flag, which tells the tool which packages to measure. Execution and coverage are separate paths, so CI needs no changes.