add test case for timer types

This commit is contained in:
Brian Akins 2017-07-27 17:01:12 -04:00
parent c9510f7f23
commit 93243f61a1

View file

@ -312,6 +312,32 @@ mappings:
config: ``,
mappings: map[string]map[string]string{},
},
// Config with good timer type.
{
config: `---
mappings:
- match: test.*.*
timer_type: summary
labels:
name: "foo"
`,
mappings: map[string]map[string]string{
"test.*.*": map[string]string{
"name": "foo",
},
},
},
// Config with bad timer type.
{
config: `---
mappings:
- match: test.*.*
timer_type: wrong
labels:
name: "foo"
`,
configBad: true,
},
}
mapper := metricMapper{}