mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 10:26:03 +00:00
22 lines
437 B
Go
22 lines
437 B
Go
package node
|
|
|
|
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) {
|
|
// Remove temporary SQLite files before running the tests.
|
|
fs.PurgeTestDbFiles(".", false)
|
|
|
|
// Run unit tests.
|
|
code := m.Run()
|
|
|
|
// Remove temporary SQLite files after running the tests.
|
|
fs.PurgeTestDbFiles(".", false)
|
|
|
|
os.Exit(code)
|
|
}
|