Skip to content
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

[chore] enable coverage for unit tests #22966

Merged
merged 9 commits into from
Jun 2, 2023

Conversation

codeboten
Copy link
Contributor

@codeboten codeboten commented May 30, 2023

This re-enables unit test coverage for the repository. Coverage will not immediately include integration tests.

Fixes #8394

This re-enables unit test coverage for the repository. Coverage
will not immediately include integration tests.

Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Patch coverage: 74.16% and project coverage change: -8.82 ⚠️

Comparison is base (17399fa) 91.91% compared to head (28f6774) 83.09%.

❗ Current head 28f6774 differs from pull request most recent head ed7c0f5. Consider uploading reports for the commit ed7c0f5 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #22966       +/-   ##
===========================================
- Coverage   91.91%   83.09%    -8.82%     
===========================================
  Files         494     1603     +1109     
  Lines       23939   152186   +128247     
===========================================
+ Hits        22003   126464   +104461     
- Misses       1429    22123    +20694     
- Partials      507     3599     +3092     
Flag Coverage Δ
integration ?
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../configschema/cfgmetadatagen/cfgmetadatagen/cli.go 0.00% <0.00%> (ø)
cmd/otelcontribcol/main.go 0.00% <0.00%> (ø)
cmd/otelcontribcol/main_others.go 0.00% <0.00%> (ø)
cmd/oteltestbedcol/main.go 0.00% <ø> (ø)
cmd/oteltestbedcol/main_others.go 0.00% <ø> (ø)
cmd/telemetrygen/internal/common/config.go 35.71% <ø> (ø)
cmd/telemetrygen/internal/common/log.go 0.00% <ø> (ø)
cmd/telemetrygen/internal/logs/config.go 0.00% <ø> (ø)
cmd/telemetrygen/internal/logs/logs.go 52.17% <ø> (ø)
cmd/telemetrygen/internal/logs/worker.go 70.00% <ø> (ø)
... and 35 more

... and 1778 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Alex Boten added 3 commits June 1, 2023 21:50
Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
@codeboten codeboten marked this pull request as ready for review June 2, 2023 05:35
@codeboten codeboten requested review from a team and TylerHelmuth June 2, 2023 05:35
@codeboten codeboten marked this pull request as draft June 2, 2023 05:40
Alex Boten added 3 commits June 1, 2023 22:44
Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
@codeboten codeboten marked this pull request as ready for review June 2, 2023 07:17
Copy link
Contributor

@MovieStoreGuy MovieStoreGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this, I appreciate being able to run CI steps locally using make :D

@codeboten codeboten merged commit 3b88866 into open-telemetry:main Jun 2, 2023
@codeboten codeboten deleted the codeboten/add-coverage branch June 2, 2023 14:34
@github-actions github-actions bot added this to the next release milestone Jun 2, 2023
@codeboten
Copy link
Contributor Author

Note that I ran into this issue when enabling coverage. We may want to disable ci failures for coverage uploads. Will need to keep an eye on how frequently this impacts the builds.

@@ -96,7 +96,12 @@ common: lint
.PHONY: test
test:
$(GOTEST) $(GOTEST_OPT) ./...


.PHONY: test-with-cover
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove / deprecate do-unit-tests-with-cover? It's not clear to me if there's a meaningful difference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's a follow up PR, i wanted to keep it until i figured out the integration tests :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly relevant, in case you haven't seen it: #22808

Caleb-Hurshman pushed a commit to observIQ/opentelemetry-collector-contrib that referenced this pull request Jul 6, 2023
This re-enables unit test coverage for the repository. Coverage will not immediately include integration tests.

Fixes open-telemetry#8394
---------

Signed-off-by: Alex Boten <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reenable codecov integration
7 participants