2020-05-26 15:15:14 +02:00
|
|
|
package workers
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/sirupsen/logrus"
|
2022-09-30 00:42:19 +02:00
|
|
|
|
|
|
|
"github.com/photoprism/photoprism/internal/config"
|
2020-05-26 15:15:14 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
|
|
|
log = logrus.StandardLogger()
|
2022-03-02 12:20:02 +01:00
|
|
|
log.SetLevel(logrus.TraceLevel)
|
2020-05-26 15:15:14 +02:00
|
|
|
|
2022-09-30 00:42:19 +02:00
|
|
|
c := config.TestConfig()
|
|
|
|
defer c.CloseDb()
|
2020-05-26 15:15:14 +02:00
|
|
|
|
|
|
|
code := m.Run()
|
|
|
|
|
|
|
|
os.Exit(code)
|
|
|
|
}
|