mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-07-03 11:53:43 +02:00
src/utils/parse_log_formatter_test.go: fix whitespace.
This commit is contained in:
parent
818cf7e7e5
commit
3568e7c908
1 changed files with 16 additions and 16 deletions
|
|
@ -2,28 +2,28 @@ package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
log "github.com/inconshreveable/log15"
|
log "github.com/inconshreveable/log15"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Test_ParseLogFormatter(t *testing.T) {
|
func Test_ParseLogFormatter(t *testing.T) {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
arg string
|
arg string
|
||||||
want log.Format
|
want log.Format
|
||||||
}{
|
}{
|
||||||
{ "Default", "", log.TerminalFormat() },
|
{ "Default", "", log.TerminalFormat() },
|
||||||
{ "LogFmt", "logfmt", log.LogfmtFormat() },
|
{ "LogFmt", "logfmt", log.LogfmtFormat() },
|
||||||
{ "Json", "json", log.JsonFormat() },
|
{ "Json", "json", log.JsonFormat() },
|
||||||
{ "JsonPretty", "json-pretty", log.JsonFormat() },
|
{ "JsonPretty", "json-pretty", log.JsonFormat() },
|
||||||
{ "Unknown", "unknown", log.TerminalFormat() },
|
{ "Unknown", "unknown", log.TerminalFormat() },
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
if got := ParseLogFormatter(tt.arg); reflect.ValueOf(got).Pointer() != reflect.ValueOf(tt.want).Pointer() {
|
if got := ParseLogFormatter(tt.arg); reflect.ValueOf(got).Pointer() != reflect.ValueOf(tt.want).Pointer() {
|
||||||
t.Errorf("parseLogFormatter() = %v, want %v", got, tt.want)
|
t.Errorf("parseLogFormatter() = %v, want %v", got, tt.want)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue