API: Remove temporary SQLite files before running tests

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-09-30 01:27:16 +02:00
parent 9c5abb05ad
commit 70aced3b12

View File

@@ -33,6 +33,9 @@ func TestMain(m *testing.M) {
log.SetLevel(logrus.TraceLevel) log.SetLevel(logrus.TraceLevel)
event.AuditLog = log event.AuditLog = log
// Remove temporary SQLite files before running the tests.
fs.PurgeTestDbFiles(".", false)
// Init test config. // Init test config.
c := config.TestConfig() c := config.TestConfig()
get.SetConfig(c) get.SetConfig(c)