mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-11-25 16:51:00 +00:00
adding more tests for malformed signalfx tags
Signed-off-by: glightfoot <glightfoot@rsglab.com>
This commit is contained in:
parent
4f7abe5226
commit
5b863848dd
1 changed files with 20 additions and 0 deletions
|
@ -200,6 +200,26 @@ func TestHandlePacket(t *testing.T) {
|
|||
CLabels: map[string]string{"tag1": "bar", "tag2": "baz"},
|
||||
},
|
||||
},
|
||||
}, {
|
||||
name: "SignalFx tag extension, no tags",
|
||||
in: "foo.[]test:100|c",
|
||||
out: event.Events{
|
||||
&event.CounterEvent{
|
||||
CMetricName: "foo.test",
|
||||
CValue: 100,
|
||||
CLabels: map[string]string{},
|
||||
},
|
||||
},
|
||||
}, {
|
||||
name: "SignalFx tag extension, non-kv tags",
|
||||
in: "foo.[tag1,tag2]test:100|c",
|
||||
out: event.Events{
|
||||
&event.CounterEvent{
|
||||
CMetricName: "foo.test",
|
||||
CValue: 100,
|
||||
CLabels: map[string]string{},
|
||||
},
|
||||
},
|
||||
}, {
|
||||
name: "influxdb tag extension with tag keys unsupported by prometheus",
|
||||
in: "foo,09digits=0,tag.with.dots=1:100|c",
|
||||
|
|
Loading…
Reference in a new issue