Use oldschool defer to cleanup after the tests

This commit is contained in:
Till Faelligen 2021-04-25 12:10:39 +02:00
parent 0b9f69e269
commit a28af5b750

View file

@ -48,9 +48,7 @@ func Test_uploadRequest_doUpload(t *testing.T) {
// create testdata folder and remove when done
_ = os.Mkdir(testdataPath, os.ModePerm)
t.Cleanup(func() {
fileutils.RemoveDir(types.Path(testdataPath), nil)
})
defer fileutils.RemoveDir(types.Path(testdataPath), nil)
db, err := storage.Open(&config.DatabaseOptions{
ConnectionString: "file::memory:?cache=shared",