MCPcopy
hub / github.com/evilsocket/opensnitch / testFindPriorityMatch

Function testFindPriorityMatch

daemon/rule/loader_test.go:258–268  ·  view source on GitHub ↗
(t *testing.T, l *Loader)

Source from the content-addressed store, hash-verified

256}
257
258func 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
270func testFindDenyMatch(t *testing.T, l *Loader) {
271 l.rules["000-allow-chrome"].Precedence = false

Callers 1

testFindMatchFunction · 0.85

Calls 1

FindFirstMatchMethod · 0.80

Tested by

no test coverage detected