From 84b57e8974ba6f7e2901011d7231575568805031 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Sat, 7 Dec 2019 23:00:28 +0200 Subject: [PATCH] app/vminsert/influx: add a test case from https://community.librenms.org/t/integration-with-victoriametrics/9689 --- app/vminsert/influx/parser_test.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/app/vminsert/influx/parser_test.go b/app/vminsert/influx/parser_test.go index cf9180a66..9e766fb01 100644 --- a/app/vminsert/influx/parser_test.go +++ b/app/vminsert/influx/parser_test.go @@ -348,6 +348,36 @@ func TestRowsUnmarshalSuccess(t *testing.T) { }}, }}, }) + // Test case from https://community.librenms.org/t/integration-with-victoriametrics/9689 + f("ports,foo=a,bar=et\\ +\\ V,baz=ype INDISCARDS=245333676,OUTDISCARDS=1798680", &Rows{ + Rows: []Row{{ + Measurement: "ports", + Tags: []Tag{ + { + Key: "foo", + Value: "a", + }, + { + Key: "bar", + Value: "et + V", + }, + { + Key: "baz", + Value: "ype", + }, + }, + Fields: []Field{ + { + Key: "INDISCARDS", + Value: 245333676, + }, + { + Key: "OUTDISCARDS", + Value: 1798680, + }, + }, + }}, + }) // Multiple lines f("foo,tag=xyz field=1.23 48934\n"+