diff --git a/dev-tools/mage/gotest.go b/dev-tools/mage/gotest.go index 332b9ff6f9f..0ed6701f212 100644 --- a/dev-tools/mage/gotest.go +++ b/dev-tools/mage/gotest.go @@ -256,6 +256,7 @@ func GoTest(ctx context.Context, params GoTestArgs) error { testArgs = append(testArgs, "-covermode=atomic", "-coverprofile="+params.CoverageProfileFile, + "-coverpkg=./...", // needed to calculate the coverage across the elastic-agent packages ) }