(t *testing.T, c *config.Config)
| 115 | } |
| 116 | |
| 117 | func fireRules(t *testing.T, c *config.Config) bool { |
| 118 | e := NewEngine(new(ps.SnapshotterMock), c) |
| 119 | evt := &event.Event{ |
| 120 | Type: event.RecvTCPv4, |
| 121 | Name: "Recv", |
| 122 | Tid: 2484, |
| 123 | PID: 859, |
| 124 | Category: event.Net, |
| 125 | Params: event.Params{ |
| 126 | params.NetDport: {Name: params.NetDport, Type: params.Uint16, Value: uint16(443)}, |
| 127 | params.NetSport: {Name: params.NetSport, Type: params.Uint16, Value: uint16(43123)}, |
| 128 | params.NetSIP: {Name: params.NetSIP, Type: params.IPv4, Value: net.ParseIP("127.0.0.1")}, |
| 129 | params.NetDIP: {Name: params.NetDIP, Type: params.IPv4, Value: net.ParseIP("216.58.201.174")}, |
| 130 | }, |
| 131 | Metadata: make(map[event.MetadataKey]any), |
| 132 | } |
| 133 | compileRules(t, e) |
| 134 | return wrapProcessEvent(evt, e.ProcessEvent) |
| 135 | } |
| 136 | |
| 137 | func TestCompileIndexableFilters(t *testing.T) { |
| 138 | e := NewEngine(new(ps.SnapshotterMock), newConfig( |
no test coverage detected