blob: 906c6dc81abdec7d7b2ff83262a3535b8c70e8f7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package main
import (
"testing"
log "github.com/sirupsen/logrus"
)
func TestLogInfo(t *testing.T) {
logrusConstant := stringToLogConstant(":info")
if logrusConstant != log.InfoLevel {
t.Errorf("Wrong logrus constant for info")
}
}
func TestLogInvalid(t *testing.T) {
logrusConstant := stringToLogConstant("ziz")
if logrusConstant != log.FatalLevel {
t.Errorf("Unknown strings should return fatal loglevel")
}
}
|