2020-06-25 01:20:58 +02:00
|
|
|
package session
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/sirupsen/logrus"
|
2022-09-28 09:01:17 +02:00
|
|
|
|
2022-10-03 22:59:29 +02:00
|
|
|
"github.com/photoprism/photoprism/internal/config"
|
|
|
|
"github.com/photoprism/photoprism/internal/event"
|
2020-06-25 01:20:58 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestMain(m *testing.M) {
|
|
|
|
log = logrus.StandardLogger()
|
2022-03-02 12:20:02 +01:00
|
|
|
log.SetLevel(logrus.TraceLevel)
|
2022-10-03 22:59:29 +02:00
|
|
|
event.AuditLog = log
|
2020-06-25 01:20:58 +02:00
|
|
|
|
2022-10-03 22:59:29 +02:00
|
|
|
c := config.TestConfig()
|
|
|
|
defer c.CloseDb()
|
2020-06-25 01:20:58 +02:00
|
|
|
|
|
|
|
code := m.Run()
|
|
|
|
|
|
|
|
os.Exit(code)
|
|
|
|
}
|