photoprism/internal/query/query_test.go
Michael Mayer 842da9f09b Backend: Query package refactoring
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-08 15:41:01 +02:00

25 lines
350 B
Go

package query
import (
"os"
"testing"
"github.com/photoprism/photoprism/internal/entity"
"github.com/sirupsen/logrus"
)
func TestMain(m *testing.M) {
log = logrus.StandardLogger()
log.SetLevel(logrus.DebugLevel)
db := entity.InitTestDb(os.Getenv("PHOTOPRISM_TEST_DSN"))
code := m.Run()
if db != nil {
db.Close()
}
os.Exit(code)
}