(t *testing.T, l *Loader)
| 281 | } |
| 282 | |
| 283 | func testFindAllowMatch(t *testing.T, l *Loader) { |
| 284 | l.rules["000-allow-chrome"].Precedence = false |
| 285 | l.rules["001-deny-chrome"].Action = Allow |
| 286 | // test 000-allow-chrome, priority == false |
| 287 | // 001-deny-chrome must match |
| 288 | match := l.FindFirstMatch(conn) |
| 289 | if match == nil { |
| 290 | t.Error("FindAllowMatch allow didn't match") |
| 291 | } |
| 292 | if match.Name != "001-deny-chrome" { |
| 293 | t.Error("findAllowMatch: allow rule failed: ", match) |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | func testFindEnabled(t *testing.T, l *Loader) { |
| 298 | l.rules["000-allow-chrome"].Precedence = false |
no test coverage detected