photoprism/internal/commands/commands_test.go
Michael Mayer e3bb8b19dd Routing: Prefix frontend UI routes with /library #840 #2466
Also improves migrations and updates the db schema docs.

Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-10-15 21:54:11 +02:00

30 lines
554 B
Go

package commands
import (
"os"
"testing"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"github.com/photoprism/photoprism/internal/config"
"github.com/photoprism/photoprism/internal/event"
"github.com/photoprism/photoprism/internal/get"
)
func TestMain(m *testing.M) {
log = logrus.StandardLogger()
log.SetLevel(logrus.TraceLevel)
event.AuditLog = log
c := config.NewTestConfig("commands")
get.SetConfig(c)
InitConfig = func(ctx *cli.Context) (*config.Config, error) {
return c, c.Init()
}
code := m.Run()
os.Exit(code)
}