mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 08:44:04 +01:00
20 lines
347 B
Go
20 lines
347 B
Go
package instance
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/photoprism/photoprism/pkg/fs"
|
|
)
|
|
|
|
// TestMain ensures SQLite test DB artifacts are purged after the suite runs.
|
|
func TestMain(m *testing.M) {
|
|
// Run unit tests.
|
|
code := m.Run()
|
|
|
|
// Remove temporary SQLite files after running the tests.
|
|
fs.PurgeTestDbFiles(".", false)
|
|
|
|
os.Exit(code)
|
|
}
|