mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2025-01-09 14:05:25 +00:00
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:
parent
b6c7e863d3
commit
568f744f2e
1 changed files with 21 additions and 0 deletions
|
@ -302,6 +302,27 @@ mappings:
|
||||||
- match: test.*.*
|
- match: test.*.*
|
||||||
timer_type: wrong
|
timer_type: wrong
|
||||||
name: "foo"
|
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: {}
|
labels: {}
|
||||||
`,
|
`,
|
||||||
configBad: true,
|
configBad: true,
|
||||||
|
|
Loading…
Reference in a new issue