Skip to content

refactor: Simplify temp file creation in tests - #3290

Merged
gmlewis merged 1 commit into
google:masterfrom
alexandear-org:refactor/simplify-test
Oct 1, 2024
Merged

refactor: Simplify temp file creation in tests#3290
gmlewis merged 1 commit into
google:masterfrom
alexandear-org:refactor/simplify-test

Conversation

@alexandear

Copy link
Copy Markdown
Contributor

The PR simplifies the openTestFile function logic by leveraging T.TempDir.

@gmlewisgmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @alexandear !
Now that you are passing t here, what do you think about making this a t.Helper?

Comment threadgithub/github_test.go
@codecov

codecovBot commented Sep 24, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.97%. Comparing base (2b8c7fa) to head (b5b123e).
Report is 126 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@## master #3290 +/- ##
==========================================
- Coverage 97.72% 92.97% -4.75% 
==========================================
Files 153 171 +18 Lines 13390 11715 -1675 ==========================================
- Hits 13085 10892 -2193 - Misses 215 729 +514 - Partials 90 94 +4 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gmlewisgmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @alexandear .
LGTM. (In the future, please don't force-push in this repo as we always squash-and-merge anyway... it makes reviewing changes easier since the last review. Thanks.)

Awaiting second LGTM+Approval from any other contributor to this repo before merging.

@gmlewisgmlewis added the NeedsReview PR is awaiting a review before merging. label Sep 25, 2024

@tomfeigintomfeigin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@gmlewisgmlewis removed the NeedsReview PR is awaiting a review before merging. label Oct 1, 2024
@gmlewis

Copy link
Copy Markdown
Collaborator

Thanks you, @tomfeigin !
Merging.

@gmlewis
gmlewis merged commit 8faa07c into google:masterOct 1, 2024
jlaportebot added a commit to jlaportebot/go-github that referenced this pull request Jun 28, 2026
Sign up for freeto 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.

3 participants

@alexandear@gmlewis@tomfeigin