Skip to content

Commit

Permalink
added to unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
KalmanMeth committed Aug 1, 2022
1 parent 8b83739 commit 2b75e4c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/pipeline/extract/aggregate/aggregate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,13 @@ func Test_FilterEntry(t *testing.T) {
entry := test.GetIngestMockEntry(false)

err, _, _ := aggregate.FilterEntry(entry)
require.Equal(t, err, nil)

err, normalizedLabels, labels := aggregate.FilterEntry(entry)
require.Equal(t, err, nil)
require.Equal(t, Labels{"srcIP": "10.0.0.1", "dstIP": "20.0.0.2"}, labels)
require.Equal(t, NormalizedValues("20.0.0.2,10.0.0.1"), normalizedLabels)

entry = test.GetIngestMockEntry(true)

err, _, _ = aggregate.FilterEntry(entry)
Expand Down

0 comments on commit 2b75e4c

Please sign in to comment.