photoprism/internal/workers/workers_test.go
Michael Mayer 3698a860c6 CI: Improve stability when running unit tests in parallel
Adds SQLite memory namespaces to avoid potential conflicts.
2022-03-31 17:55:40 +02:00

22 lines
316 B
Go

package workers
import (
"os"
"testing"
"github.com/photoprism/photoprism/internal/config"
"github.com/sirupsen/logrus"
)
func TestMain(m *testing.M) {
log = logrus.StandardLogger()
log.SetLevel(logrus.TraceLevel)
c := config.NewTestConfig("workers")
code := m.Run()
_ = c.CloseDb()
os.Exit(code)
}