Skip to content

Commit b01216b

Browse files
mergify[bot]pchila
andauthored
Add -coverpkg option when running unit test to calculate coverage across packages (#9913) (#9917)
(cherry picked from commit 7c3157b) Co-authored-by: Paolo Chilà <[email protected]>
1 parent 4b63637 commit b01216b

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)