diff --git a/dev-tools/mage/gotest.go b/dev-tools/mage/gotest.go index 5816ef98008..96c47c39126 100644 --- a/dev-tools/mage/gotest.go +++ b/dev-tools/mage/gotest.go @@ -257,6 +257,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 ) }