From a28af5b750b70c7a59753798e61a7089375262c2 Mon Sep 17 00:00:00 2001 From: Till Faelligen Date: Sun, 25 Apr 2021 12:10:39 +0200 Subject: [PATCH] Use oldschool defer to cleanup after the tests --- mediaapi/routing/upload_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mediaapi/routing/upload_test.go b/mediaapi/routing/upload_test.go index b1fdac908..c5cc728ed 100644 --- a/mediaapi/routing/upload_test.go +++ b/mediaapi/routing/upload_test.go @@ -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",