Skip to content

Commit a40ead5

Browse files
pchilamergify[bot]
authored andcommitted
Add -coverpkg option when running unit test to calculate coverage across packages (#9913)
(cherry picked from commit 7c3157b)
1 parent c8d311c commit a40ead5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dev-tools/mage/gotest.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ func GoTest(ctx context.Context, params GoTestArgs) error {
261261
testArgs = append(testArgs,
262262
"-covermode=atomic",
263263
"-coverprofile="+params.CoverageProfileFile,
264+
"-coverpkg=./...", // needed to calculate the coverage across the elastic-agent packages
264265
)
265266
}
266267

0 commit comments

Comments
 (0)