-
Notifications
You must be signed in to change notification settings - Fork 48
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
test: enable coverage of crit unit/e2e tests #121
test: enable coverage of crit unit/e2e tests #121
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #121 +/- ##
==========================================
+ Coverage 18.72% 22.42% +3.69%
==========================================
Files 93 94 +1
Lines 15081 15207 +126
==========================================
+ Hits 2824 3410 +586
+ Misses 11979 11501 -478
- Partials 278 296 +18 see 24 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
c618ba1
to
aba5cb2
Compare
622b1d7
to
3277afa
Compare
3277afa
to
796548e
Compare
@snprajwal PTAL |
75b7558
to
8774903
Compare
Nice change. Moving the unit test to |
This is also a good indicator that we should add some more tests. |
@adrianreber |
Sounds good. |
One thing I am thinking about is that for unit tests we could always generate test coverage output while using |
We can have a |
Sounds like a good idea. |
433385f
to
bb4df14
Compare
bb4df14
to
53fe990
Compare
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.
LGTM
@rst0git works for me. There still seems to be one question open. What about always running unit tests with test coverage results? Unit test coverage does not depend on Go 1.20 and can always be created. |
I have added a commit to always run the unit tests with test coverage results. |
To generate code coverage for the unit tests of crit they need to be part of the crit package. This patch moves the unit test from 'test/crit/' to 'crit/' as a preparation for a subsequent patch where we would enable test coverage. Signed-off-by: Radostin Stoyanov <[email protected]>
This patch enables test coverage for the unit tests of crit. Suggested-by: Adrian Reber <[email protected]> Signed-off-by: Radostin Stoyanov <[email protected]>
This patch enables coverage for the end-to-end tests of crit. Suggested-by: Adrian Reber <[email protected]> Signed-off-by: Radostin Stoyanov <[email protected]>
To reduce code duplication, we add a Makefile for building the `loop` executable. Signed-off-by: Radostin Stoyanov <[email protected]>
There are two ways we can enable test coverage for the unit tests: 1) `-coverprofile` and 2) `-cover`. The first method stores the results in a file that we can upload with `codecov`. The second method only outputs the test coverage results to standard output. This patch set the default value of GOFLAGS to `-cover` to always show the coverage of unit tests. Suggested-by: Adrian Reber <[email protected]> Signed-off-by: Radostin Stoyanov <[email protected]>
16326e8
to
dbf1473
Compare
This pull request enables code coverage for CRIT's unit and e2e tests.