mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-11-13 10:51:06 +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.*.*
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue