mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-28 09:13:09 -06:00
Use oldschool defer to cleanup after the tests
This commit is contained in:
parent
0b9f69e269
commit
a28af5b750
|
|
@ -48,9 +48,7 @@ func Test_uploadRequest_doUpload(t *testing.T) {
|
||||||
|
|
||||||
// create testdata folder and remove when done
|
// create testdata folder and remove when done
|
||||||
_ = os.Mkdir(testdataPath, os.ModePerm)
|
_ = os.Mkdir(testdataPath, os.ModePerm)
|
||||||
t.Cleanup(func() {
|
defer fileutils.RemoveDir(types.Path(testdataPath), nil)
|
||||||
fileutils.RemoveDir(types.Path(testdataPath), nil)
|
|
||||||
})
|
|
||||||
|
|
||||||
db, err := storage.Open(&config.DatabaseOptions{
|
db, err := storage.Open(&config.DatabaseOptions{
|
||||||
ConnectionString: "file::memory:?cache=shared",
|
ConnectionString: "file::memory:?cache=shared",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue