diff --git a/dev-tools/mage/gotest.go b/dev-tools/mage/gotest.go index a5ab60e41d6..a259aa5fbd2 100644 --- a/dev-tools/mage/gotest.go +++ b/dev-tools/mage/gotest.go @@ -261,6 +261,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 ) }