MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / TestInitFromConfig

Function TestInitFromConfig

pkg/util/log/logger_test.go:28–38  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

26)
27
28func TestInitFromConfig(t *testing.T) {
29 require.Error(t, InitFromConfig(Config{}, "fibratus.log"))
30 require.NoError(t, InitFromConfig(Config{Path: "_fixtures", Level: "info", Formatter: "text"}, "fibratus.log"))
31
32 os.Remove("_fixtures\\fibratus.log")
33
34 logrus.Info("fibratus initialized")
35
36 _, err := os.Stat("_fixtures\\fibratus.log")
37 require.NoError(t, err)
38}

Callers

nothing calls this directly

Calls 4

InitFromConfigFunction · 0.85
InfoMethod · 0.80
RemoveMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected