(t *testing.T, l *Loader)
| 256 | } |
| 257 | |
| 258 | func testFindPriorityMatch(t *testing.T, l *Loader) { |
| 259 | match := l.FindFirstMatch(conn) |
| 260 | if match == nil { |
| 261 | t.Error("FindPriorityMatch didn't match") |
| 262 | } |
| 263 | // test 000-allow-chrome, priority == true |
| 264 | if match.Name != "000-allow-chrome" { |
| 265 | t.Error("findPriorityMatch: priority rule failed: ", match) |
| 266 | } |
| 267 | |
| 268 | } |
| 269 | |
| 270 | func testFindDenyMatch(t *testing.T, l *Loader) { |
| 271 | l.rules["000-allow-chrome"].Precedence = false |
no test coverage detected