Merge pull request #12489 from zhijianli88/cleanup-tmpfiles

Cleanup tmpfiles
This commit is contained in:
Sahdev Zala
2021-01-07 12:26:04 -05:00
committed by GitHub
2 changed files with 2 additions and 0 deletions

View File

@ -98,6 +98,7 @@ func TestConfigFromFile(t *testing.T) {
continue
}
if cerr != nil {
os.Remove(tmpfile.Name())
continue
}

View File

@ -135,6 +135,7 @@ func TestZeroToEnd(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer os.Remove(f.Name())
defer f.Close()
// Ensure 0 size is a nop so zero-to-end on an empty file won't give EINVAL.