mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
81987eebe4
resolve: https://github.com/open-policy-agent/opa/issues/3324 When running `opa test -c -b`, the coverage reporter received nil modules because cmd/test.go only populated the modules variable in the file-loading branch. This caused cover.Report() to skip the NotCovered walk, resulting in 100% coverage regardless of actual test coverage. Extract modules from bundles via ParsedModules() when both bundle mode and coverage are enabled, so the coverage reporter can correctly identify uncovered lines. Tested the change locally as well with the steps in the issue. Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>