Merge pull request #14248 from ahrtr/update_TestRemoveMatchFile

No need to manually remove tmp directory created by t.TempDir()
This commit is contained in:
Benjamin Wang 2022-07-21 17:31:43 +08:00 committed by GitHub
commit 6d27a42b7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,7 +180,6 @@ func TestDirPermission(t *testing.T) {
func TestRemoveMatchFile(t *testing.T) {
tmpdir := t.TempDir()
defer os.RemoveAll(tmpdir)
f, err := os.CreateTemp(tmpdir, "tmp")
if err != nil {
t.Fatal(err)