| 164 | } |
| 165 | |
| 166 | func 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 | |
| 183 | func TestRunSequenceRule(t *testing.T) { |
| 184 | log.SetLevel(log.DebugLevel) |