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
testing: remove some defer cleanup in favor of test.Cleanup() #43340
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
d52fe2d
to
1a1e96b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nervously LGTM 😅
(I can see that this is probably correct, and should be fine, but it still feels conceptually wrong to remove the defer deleteTempFiles()
bits 🙈 I'll get over it)
Yeah, so |
1a1e96b
to
2c6c9b7
Compare
2c6c9b7
to
91351f9
Compare
gotest.tools v3.0.1 and up support Go's native test.Cleanup(), which means that manually calling the cleanup functions in a defer is no longer needed. Some of these could probably be replaced by Go's native `t.TempDir()`, but keeping that for a follow-up exercise. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
91351f9
to
8b44af0
Compare
gotest.tools v3.0.1 and up support Go's native test.Cleanup(), (see gotestyourself/gotest.tools#180) which means that manually calling the cleanup functions in a defer is no longer needed.
Some of these could probably be replaced by Go's native
t.TempDir()
, but keeping that for a follow-up exercise.- A picture of a cute animal (not mandatory but encouraged)