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

Function TestEventlogOutput

pkg/config/output_test.go:83–99  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

81}
82
83func TestEventlogOutput(t *testing.T) {
84 c := NewWithOpts(WithRun())
85
86 err := c.flags.Parse([]string{"--config-file=_fixtures/eventlog-output.yml"})
87 require.NoError(t, c.viper.BindPFlags(c.flags))
88 require.NoError(t, err)
89 require.NoError(t, c.TryLoadFile(c.GetConfigFile()))
90
91 require.NoError(t, c.Init())
92
93 require.NotNil(t, c.Output)
94 require.IsType(t, eventlog.Config{}, c.Output.Output)
95
96 eventlogConfig := c.Output.Output.(eventlog.Config)
97 assert.True(t, eventlogConfig.Enabled)
98 assert.Equal(t, "INFO", eventlogConfig.Level)
99}

Callers

nothing calls this directly

Calls 6

NewWithOptsFunction · 0.85
WithRunFunction · 0.85
TryLoadFileMethod · 0.80
GetConfigFileMethod · 0.80
EqualMethod · 0.80
InitMethod · 0.45

Tested by

no test coverage detected