Skip to content

Conversation

@pjohnst5
Copy link
Contributor

@pjohnst5 pjohnst5 commented Dec 15, 2020

Changing to go test line to include all packages in the repo, not just ones that already have test files.

See this thread for more deets
https://stackoverflow.com/questions/59903169/go-wrong-coverage-when-there-is-no-tests-for-a-package

Example: Before this commit, the coverage for cni was
image
And now its
image

Notice that internal.go netconfig.go and others were being ignored before in the coverage report. It's because the cni package had no tests at all, so it was just being left out of the report. Now packages with no tests are being included in the coverage.

@codecov
Copy link

codecov bot commented Dec 15, 2020

Codecov Report

Merging #754 (9560377) into master (3c48a34) will increase coverage by 1.60%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #754      +/-   ##
==========================================
+ Coverage   39.89%   41.49%   +1.60%     
==========================================
  Files          82      141      +59     
  Lines       10858    13461    +2603     
==========================================
+ Hits         4332     5586    +1254     
- Misses       6016     7182    +1166     
- Partials      510      693     +183     

@pjohnst5 pjohnst5 changed the title test Show accurate codecoverage for entire repo Dec 15, 2020
@pjohnst5 pjohnst5 marked this pull request as ready for review December 16, 2020 00:01
@pjohnst5 pjohnst5 changed the title Show accurate codecoverage for entire repo Show codecoverage for entire repo Dec 16, 2020
@pjohnst5 pjohnst5 merged commit fb3481d into Azure:master Dec 16, 2020
@pjohnst5 pjohnst5 deleted the coverage branch December 16, 2020 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants