photoprism/pkg/dummy/logger_test.go
Michael Mayer f5a8c5a45d Auth: Session and ACL enhancements #98 #1746
Signed-off-by: Michael Mayer <michael@photoprism.app>
2022-09-28 09:01:17 +02:00

30 lines
672 B
Go

package dummy
import (
"testing"
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
)
func TestNewLogger(t *testing.T) {
log := NewLogger()
log.Fatal("foo", 1, []string{}, nil)
log.Fatalf("foo", 1, []string{}, nil)
log.Fatalln()
log.Panic("foo", 1, []string{}, nil)
log.Panicf("foo", 1, []string{}, nil)
log.Panicln()
assert.Equal(t, logrus.PanicLevel, log.GetLevel())
log.SetLevel(logrus.TraceLevel)
assert.Equal(t, logrus.TraceLevel, log.GetLevel())
log.Fatal("foo", 1, []string{}, nil)
log.Fatalf("foo", 1, []string{}, nil)
log.Fatalln()
log.Panic("foo", 1, []string{}, nil)
log.Panicf("foo", 1, []string{}, nil)
log.Panicln()
}