MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / TestLogLevelFiltering

Function TestLogLevelFiltering

log/logger_test.go:16–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

14)
15
16func TestLogLevelFiltering(t *testing.T) {
17 for logLevelInt := 0; logLevelInt < 8; logLevelInt++ {
18 t.Run(fmt.Sprintf("filter=%s", config.LogLevel(logLevelInt).MustName()), func(t *testing.T) {
19 for writeLogLevelInt := 0; writeLogLevelInt < 8; writeLogLevelInt++ {
20 logLevel := config.LogLevel(logLevelInt)
21 writeLogLevel := config.LogLevel(writeLogLevelInt)
22 t.Run(
23 fmt.Sprintf("write=%s", config.LogLevel(writeLogLevelInt).MustName()),
24 func(t *testing.T) {
25 testLevel(t, logLevel, writeLogLevel)
26 },
27 )
28 }
29 })
30 }
31}
32
33func testLevel(t *testing.T, logLevel config.LogLevel, writeLogLevel config.LogLevel) {
34 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 4

LogLevelTypeAlias · 0.92
testLevelFunction · 0.85
RunMethod · 0.65
MustNameMethod · 0.45

Tested by

no test coverage detected