mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-24 06:19:08 +02:00
fix event aggregation test
Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
@@ -176,7 +176,7 @@ func generateEvents(srcIp, dstIp netip.Addr, dstPort uint16, eventTypes []types.
|
|||||||
Timestamp: inEvents[0].Timestamp,
|
Timestamp: inEvents[0].Timestamp,
|
||||||
EventFields: types.EventFields{
|
EventFields: types.EventFields{
|
||||||
FlowID: flowId,
|
FlowID: flowId,
|
||||||
Type: inEvents[0].Type,
|
Type: types.TypeUnknown,
|
||||||
Protocol: inEvents[0].Protocol,
|
Protocol: inEvents[0].Protocol,
|
||||||
RuleID: []byte("rule-id-1"),
|
RuleID: []byte("rule-id-1"),
|
||||||
Direction: inEvents[0].Direction,
|
Direction: inEvents[0].Direction,
|
||||||
|
|||||||
@@ -134,7 +134,6 @@ func (am *AggregatingMemory) GetAggregatedEvents() []*types.Event {
|
|||||||
if aggregatedEvent.Timestamp.Compare(v.Timestamp) > 0 {
|
if aggregatedEvent.Timestamp.Compare(v.Timestamp) > 0 {
|
||||||
aggregatedEvent.Timestamp = v.Timestamp
|
aggregatedEvent.Timestamp = v.Timestamp
|
||||||
aggregatedEvent.ID = v.ID
|
aggregatedEvent.ID = v.ID
|
||||||
aggregatedEvent.Type = v.Type
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user