photoprism/internal/auth/oidc/oidc_test.go
2025-11-23 22:34:50 +10:00

25 lines
475 B
Go

package oidc
import (
"os"
"testing"
"github.com/sirupsen/logrus"
"github.com/photoprism/photoprism/internal/event"
)
// TestMain executes testMain returning it's results. It is done this way so that defer can be used to cleanup.
func TestMain(m *testing.M) {
os.Exit(testMain(m))
}
func testMain(m *testing.M) int {
// Init test logger.
log = logrus.StandardLogger()
log.SetLevel(logrus.TraceLevel)
event.AuditLog = log
// Run unit tests.
return m.Run()
}