c7be7c43eb
Signed-off-by: Michael Mayer <michael@photoprism.app>
30 lines
562 B
Go
30 lines
562 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/service"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
log = logrus.StandardLogger()
|
|
log.SetLevel(logrus.TraceLevel)
|
|
event.AuditLog = log
|
|
|
|
c := config.NewTestConfig("commands")
|
|
service.SetConfig(c)
|
|
|
|
InitConfig = func(ctx *cli.Context) (*config.Config, error) {
|
|
return c, c.Init()
|
|
}
|
|
|
|
code := m.Run()
|
|
|
|
os.Exit(code)
|
|
}
|