Tests for metric type mapping config

Co-authored-by: Simon Westphahl <westphahl@gmail.com>
Signed-off-by: Simon Westphahl <simon.westphahl@bmw.de>
This commit is contained in:
Simon Westphahl 2018-06-14 14:27:28 +02:00
parent b6c7e863d3
commit 568f744f2e

View file

@ -302,6 +302,27 @@ mappings:
- match: test.*.*
timer_type: wrong
name: "foo"
labels: {}
`,
configBad: true,
},
// Config with good metric type.
{
config: `---
mappings:
- match: test.*.*
match_metric_type: counter
name: "foo"
labels: {}
`,
},
// Config with bad metric type matcher.
{
config: `---
mappings:
- match: test.*.*
match_metric_type: wrong
name: "foo"
labels: {}
`,
configBad: true,