This repository has been archived by the owner on May 12, 2021. It is now read-only.
unit-test: cleaning up stale files under /tmp #2398
Labels
enhancement
Improvement to an existing feature
needs-review
Needs to be assessed by the team.
wip
Work in Progress (PR incomplete - needs more work or rework)
I've found a few unit tests which were generating stale files under
/tmp
- Using
defer
in TestMain.os.Exit will skip all deferred instructions.
So we should reconstruct TestMain to leave all setup-related code in setup(), and all cleanup-related code in shutdown().
- Missing deleting what
ioutil.TempDir()
createsNormally,
ioutil.TempDir
will create a new temporary dir under/tmp
.PR is on the fly~~~~
The text was updated successfully, but these errors were encountered: