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

Function TestRunSimpleRules

pkg/rules/engine_test.go:166–181  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

164}
165
166func TestRunSimpleRules(t *testing.T) {
167 var tests = []struct {
168 config *config.Config
169 matches bool
170 }{
171 {newConfig("_fixtures/simple_matches.yml"), true},
172 {newConfig("_fixtures/simple_matches/filter*.yml"), true},
173 }
174
175 for i, tt := range tests {
176 matches := fireRules(t, tt.config)
177 if matches != tt.matches {
178 t.Errorf("%d. %v process rules mismatch: exp=%t got=%t", i, tt.config.Filters, tt.matches, matches)
179 }
180 }
181}
182
183func TestRunSequenceRule(t *testing.T) {
184 log.SetLevel(log.DebugLevel)

Callers

nothing calls this directly

Calls 2

newConfigFunction · 0.85
fireRulesFunction · 0.85

Tested by

no test coverage detected