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

Function TestLoadRulesFromPathsWithTemplate

pkg/config/filters_test.go:80–98  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

78}
79
80func TestLoadRulesFromPathsWithTemplate(t *testing.T) {
81 filters := Filters{
82 Rules{
83 FromPaths: []string{
84 "_fixtures/filters/default-with-template.yml",
85 },
86 },
87 Macros{FromPaths: nil},
88 false,
89 map[string]*Macro{},
90 []*FilterConfig{},
91 }
92 err := filters.LoadFilters()
93 require.NoError(t, err)
94 require.Len(t, filters.filters, 1)
95
96 f1 := filters.filters[0]
97 assert.Equal(t, "ALL NETWORK EVENTS\n", f1.Output)
98}
99
100func TestLoadGroupsFromURLs(t *testing.T) {
101 mux := http.NewServeMux()

Callers

nothing calls this directly

Calls 3

LoadFiltersMethod · 0.95
EqualMethod · 0.80
LenMethod · 0.45

Tested by

no test coverage detected