Skip to content

Commit

Permalink
one extra case for number prefixes
Browse files Browse the repository at this point in the history
Signed-off-by: alexgreenbank <[email protected]>
  • Loading branch information
alexgreenbank committed Jan 10, 2025
1 parent dba92d0 commit 7cb5478
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/influx/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,21 @@ func TestParseInfluxLineReader(t *testing.T) {
},
},
},
{
name: "parse invalid char conversion number prefix",
url: "/",
data: "0measurement,1t1=v1 f1=0 1465839830100400200",
expectedResult: []mimirpb.TimeSeries{
{
Labels: []mimirpb.LabelAdapter{
{Name: "_1t1", Value: "v1"},
{Name: "__name__", Value: "_0measurement_f1"},
{Name: "__proxy_source__", Value: "influx"},
},
Samples: []mimirpb.Sample{{Value: 0, TimestampMs: 1465839830100}},
},
},
},
}

for _, tt := range tests {
Expand Down

0 comments on commit 7cb5478

Please sign in to comment.