Skip to content

Commit

Permalink
Fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ritalwar committed Oct 21, 2023
1 parent c734cf2 commit ca489d5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions x-pack/metricbeat/module/statsd/server/data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ func TestTagsGrouping(t *testing.T) {
require.NoError(t, err)

events := ms.getEvents()
assert.Len(t, events, 2)
assert.Len(t, events, 4)

actualTags := []mapstr.M{}
for _, e := range events {
Expand All @@ -1144,6 +1144,18 @@ func TestTagsGrouping(t *testing.T) {
"k2": "v2",
},
},
{
"labels": mapstr.M{
"k1": "v1",
"k2": "v2",
},
},
{
"labels": mapstr.M{
"k1": "v2",
"k2": "v3",
},
},
{
"labels": mapstr.M{
"k1": "v2",
Expand Down Expand Up @@ -1222,7 +1234,7 @@ func TestData(t *testing.T) {
require.NoError(t, err)

events := ms.getEvents()
assert.Len(t, events, 1)
assert.Len(t, events, 10)

mbevent := mbtest.StandardizeEvent(ms, *events[0])
mbtest.WriteEventToDataJSON(t, mbevent, "")
Expand Down

0 comments on commit ca489d5

Please sign in to comment.