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: use usetesting instead of tenv #19488

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

mmorel-35
Copy link
Contributor

@mmorel-35 mmorel-35 commented Feb 26, 2025

Description

This is migrating from tenv to usetesting

Closes #19485

@k8s-ci-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.92%. Comparing base (47e764f) to head (a8d8c18).
Report is 6 commits behind head on main.

Additional details and impacted files

see 18 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #19488      +/-   ##
==========================================
- Coverage   68.95%   68.92%   -0.03%     
==========================================
  Files         420      420              
  Lines       35762    35762              
==========================================
- Hits        24658    24648      -10     
- Misses       9677     9689      +12     
+ Partials     1427     1425       -2     

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47e764f...a8d8c18. Read the comment docs.

@mmorel-35 mmorel-35 force-pushed the golangci-lint/usetesting branch 2 times, most recently from 5323f34 to 2bc72d3 Compare February 26, 2025 06:52
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
@mmorel-35 mmorel-35 force-pushed the golangci-lint/usetesting branch from 2bc72d3 to a8d8c18 Compare February 26, 2025 06:56
Comment on lines -169 to -170
oldenv := os.Getenv("EXPECT_DEBUG")
defer os.Setenv("EXPECT_DEBUG", oldenv)
Copy link
Member

Choose a reason for hiding this comment

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

can you please explain why remove these two lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

using t.SetEnv is doing the same thing with cleanup at the end of the test execution

Copy link
Member

Choose a reason for hiding this comment

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

thx for the clarification.

Copy link
Member

@ivanvc ivanvc left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks, @mmorel-35.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, ivanvc, mmorel-35

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahrtr ahrtr merged commit a423349 into etcd-io:main Feb 27, 2025
41 checks passed
@mmorel-35 mmorel-35 deleted the golangci-lint/usetesting branch February 27, 2025 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Replace tenv linter with usetesting
4 participants