22 lines
427 B
Go
22 lines
427 B
Go
|
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")
|
||
|
}
|
||
|
}
|