-
Notifications
You must be signed in to change notification settings - Fork 188
Add -coverpkg option when running unit test to calculate coverage across packages #9913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add -coverpkg option when running unit test to calculate coverage across packages #9913
Conversation
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
|
💚 Build Succeeded
cc @pchila |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I am surprised why we haven't observed until now (you did and thank you @pchila ) that the code under coverage is off, but I totally understand what coverpkg
and I do believe we need it to be ./...
so LGTM
@Mergifyio backport 8.18 8.19 9.0 9.1 |
✅ Backports have been created
|
@pkoutsovasilis |
…oss packages (#9913) (#9915) (cherry picked from commit 7c3157b) Co-authored-by: Paolo Chilà <[email protected]>
…oss packages (#9913) (#9916) (cherry picked from commit 7c3157b) Co-authored-by: Paolo Chilà <[email protected]>
…oss packages (#9913) (#9917) (cherry picked from commit 7c3157b) Co-authored-by: Paolo Chilà <[email protected]>
…oss packages (#9913) (#9914) (cherry picked from commit 7c3157b) Co-authored-by: Paolo Chilà <[email protected]>
* upstream: (26 commits) fix: ensure EDOT subprocess shuts down gracefully on agent termination (#9886) [main][Automation] Update versions (#9976) Add Collector reference docs and automation (#9953) [beatreceivers] Integrate beatsauthextension (#9257) [main][Automation] Update versions (#9941) Update OTel components to v0.132.0/v1.38.0 (#9954) Enhancement/5235 wrap errors when marking upgrade (#9366) Mount Go build cache into crossbuild container (#9094) Liveness agent state (#9673) [main][Automation] Bump VM Image version to 1757725254 (#9942) Enhancement/5235 correctly wrap errors from copyActionDir and copyRunDirectory (#9349) [main][Automation] Update elastic/beats to afc53c0479ac (#9874) Add -coverpkg option when running unit test to calculate coverage across packages (#9913) Cache binaries downloaded for packaging locally (#9133) [main][Automation] Update versions (#9897) Disable flaky test TestBeatsReceiverLogs (#9891) Allow overriding AGENT_PACKAGE_VERSION and MANIFEST_URL when USE_PACKAGE_VERSION=true (#9864) add ingest-docs team as CODEOWNERS for release notes and docset.yml (#9865) fix: correct spelling of 'output' in various templates and monitoring code (#9827) k8s: Add comment around hostUsers for Universal Profiling deployments (#9847) ...
What does this PR do?
Add
-coverpkg
parameter to collect coverage data for any package underelastic-agent
module.Why is it important?
This allows for more correct coverage calculation when some code is tested via a test located in a different package.
Checklist
[ ] I have commented my code, particularly in hard-to-understand areas[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added tests that prove my fix is effective or that my feature works[ ] I have added an entry in./changelog/fragments
using the changelog tool[ ] I have added an integration test or an E2E testDisruptive User Impact
How to test this PR locally
Related issues
Questions to ask yourself