Skip to content

Commit ef99dd1

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

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
@@ -256,6 +256,7 @@ func GoTest(ctx context.Context, params GoTestArgs) error {
256256
testArgs = append(testArgs,
257257
"-covermode=atomic",
258258
"-coverprofile="+params.CoverageProfileFile,
259+
"-coverpkg=./...", // needed to calculate the coverage across the elastic-agent packages
259260
)
260261
}
261262

0 commit comments

Comments
 (0)