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

tests: use tempdir to avoid manual gc #4967

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Conversation

mxtw
Copy link
Contributor

@mxtw mxtw commented Sep 3, 2024

I was not able to find any other places where this was applicable, other places that use temporary files are not within the context of a testing.T, so I was not sure how to deal with this.
I have also removed a redundant call to testEnv.CreateObjectFile, let me know if you would rather have this in a separate commit!

Fixes #3594

@stefanprodan stefanprodan added the area/testing Testing related issues and pull requests label Sep 4, 2024
Copy link
Member

@stefanprodan stefanprodan 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 @mxtw

@stefanprodan stefanprodan merged commit cb327a7 into fluxcd:main Sep 5, 2024
8 checks passed
@mxtw mxtw deleted the use-tempdir branch September 5, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Testing related issues and pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use t.TempDir() where applicable instead of manually dealing with GC
2 participants