Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Adding Unit tests to increase coverage #1979

Merged
merged 2 commits into from
Feb 28, 2019
Merged

Conversation

tariq1890
Copy link
Contributor

@tariq1890 tariq1890 commented Aug 4, 2018

What does this do / why do we need it?

Adds more units. Covers an a case in check where pruneopts have been changed.

Trying to understand this codebase one test case at a time :)

What should your reviewer look out for in this PR?

Changes are mostly in test files. One cosmetic change applied in digest.go

Do you need help or clarification on anything?

@tariq1890 tariq1890 requested a review from sdboyer as a code owner August 4, 2018 19:10
@tariq1890
Copy link
Contributor Author

@sdboyer The failure in this build is actually due to a test file. Lmk if you need me to fix. I had actually just reused an existing test file.

@tariq1890
Copy link
Contributor Author

Ping! Could you look into this PR? All the changes are in the test folders. This is mainly non-breaking code.

@tariq1890
Copy link
Contributor Author

I completely understand if you don't want this change. But no reply or even an acknowledgement of this since 6 weeks :( ? I did put some time and effort to this.

@sdboyer
Copy link
Member

sdboyer commented Oct 3, 2018 via email

@tariq1890
Copy link
Contributor Author

I understand :). Good luck and Congratulations!

@tariq1890
Copy link
Contributor Author

@theckman I see that you have the write access to this repo. Can this be merged? The Codacy fail is actually harmless if I remember correctly.

@kevinburke
Copy link
Collaborator

Hey Tariq - can you merge in the latest master, or rebase your branch against master, and push again? The tests should be back to green now.

@tariq1890
Copy link
Contributor Author

Done! So glad to see this project active again :).

@theckman
Copy link
Collaborator

theckman commented Feb 28, 2019

+0.4% improvement in coverage

Before:

ok      github.com/golang/dep   5.777s  coverage: 58.1% of statements
ok      github.com/golang/dep/cmd/dep   80.725s coverage: 71.7% of statements
ok      github.com/golang/dep/gps       117.672s        coverage: 79.2% of statements
?       github.com/golang/dep/gps/internal/pb   [no test files]
ok      github.com/golang/dep/gps/paths 1.027s  coverage: 100.0% of statements
ok      github.com/golang/dep/gps/pkgtree       1.205s  coverage: 89.4% of statements
ok      github.com/golang/dep/gps/verify        1.074s  coverage: 87.7% of statements
ok      github.com/golang/dep/internal/feedback 1.058s  coverage: 89.9% of statements
ok      github.com/golang/dep/internal/fs       1.126s  coverage: 64.0% of statements
?       github.com/golang/dep/internal/importers        [no test files]
ok      github.com/golang/dep/internal/importers/base   14.635s coverage: 91.1% of statements
ok      github.com/golang/dep/internal/importers/glide  3.452s  coverage: 81.7% of statements
ok      github.com/golang/dep/internal/importers/glock  2.241s  coverage: 84.0% of statements
ok      github.com/golang/dep/internal/importers/godep  2.605s  coverage: 87.5% of statements
ok      github.com/golang/dep/internal/importers/govend 2.220s  coverage: 85.7% of statements
ok      github.com/golang/dep/internal/importers/govendor       3.019s  coverage: 86.7% of statements
ok      github.com/golang/dep/internal/importers/gvt    5.927s  coverage: 87.2% of statements
?       github.com/golang/dep/internal/importers/importertest   [no test files]
ok      github.com/golang/dep/internal/importers/vndr   2.678s  coverage: 88.7% of statements
?       github.com/golang/dep/internal/test     [no test files]
?       github.com/golang/dep/internal/test/integration [no test files]
total:                                                                  (statements)                    76.4%

After:

ok      github.com/golang/dep   6.522s  coverage: 58.1% of statements
ok      github.com/golang/dep/cmd/dep   73.940s coverage: 72.3% of statements
ok      github.com/golang/dep/gps       97.230s coverage: 79.2% of statements
?       github.com/golang/dep/gps/internal/pb   [no test files]
ok      github.com/golang/dep/gps/paths 1.026s  coverage: 100.0% of statements
ok      github.com/golang/dep/gps/pkgtree       1.186s  coverage: 92.6% of statements
ok      github.com/golang/dep/gps/verify        1.095s  coverage: 91.7% of statements
ok      github.com/golang/dep/internal/feedback 1.066s  coverage: 89.9% of statements
ok      github.com/golang/dep/internal/fs       1.093s  coverage: 64.0% of statements
?       github.com/golang/dep/internal/importers        [no test files]
ok      github.com/golang/dep/internal/importers/base   14.106s coverage: 91.1% of statements
ok      github.com/golang/dep/internal/importers/glide  3.837s  coverage: 81.7% of statements
ok      github.com/golang/dep/internal/importers/glock  2.209s  coverage: 84.0% of statements
ok      github.com/golang/dep/internal/importers/godep  2.603s  coverage: 87.5% of statements
ok      github.com/golang/dep/internal/importers/govend 2.176s  coverage: 85.7% of statements
ok      github.com/golang/dep/internal/importers/govendor       5.225s  coverage: 86.7% of statements
ok      github.com/golang/dep/internal/importers/gvt    5.448s  coverage: 87.2% of statements
?       github.com/golang/dep/internal/importers/importertest   [no test files]
ok      github.com/golang/dep/internal/importers/vndr   2.211s  coverage: 88.7% of statements
?       github.com/golang/dep/internal/test     [no test files]
?       github.com/golang/dep/internal/test/integration [no test files]
total:                                                                  (statements)                    76.8%

@theckman theckman merged commit 3d0cccb into golang:master Feb 28, 2019
theckman added a commit that referenced this pull request Feb 28, 2019
Adding Unit tests to increase coverage

Signed-off-by: Tim Heckman <[email protected]>
@tariq1890 tariq1890 deleted the unit_tests branch February 28, 2019 18:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants