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

Don't import testing package in production builds #2786

Merged
merged 3 commits into from Apr 14, 2022
Merged

Don't import testing package in production builds #2786

merged 3 commits into from Apr 14, 2022

Conversation

dmathieu
Copy link
Member

Fixes #2783

This changes the global_test package used in some tests to use global, so ResetForTests can be in the same package, and in a test-only file.
It also moves ResetForTests to a util_test.go file, which will only be available at test time, removes testing from production builds.

@codecov
Copy link

codecov bot commented Apr 13, 2022

Codecov Report

Merging #2786 (3d997eb) into main (46a10bb) will decrease coverage by 0.0%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2786     +/-   ##
=======================================
- Coverage   75.8%   75.7%   -0.1%     
=======================================
  Files        178     178             
  Lines      11707   11700      -7     
=======================================
- Hits        8875    8868      -7     
  Misses      2607    2607             
  Partials     225     225             
Impacted Files Coverage Δ
internal/global/state.go 100.0% <ø> (ø)
trace.go 66.6% <0.0%> (-33.4%) ⬇️
exporters/jaeger/jaeger.go 91.1% <0.0%> (+0.8%) ⬆️

@MrAlias MrAlias added this to the Release v1.7.0 milestone Apr 14, 2022
@MrAlias MrAlias merged commit c65c3be into open-telemetry:main Apr 14, 2022
@dmathieu dmathieu deleted the testing-no-prod branch April 14, 2022 16:51
@MrAlias MrAlias mentioned this pull request Apr 28, 2022
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.

internal/global imports testing
4 participants