From 93243f61a19d550a27361f6c0156e1d29378a724 Mon Sep 17 00:00:00 2001 From: Brian Akins Date: Thu, 27 Jul 2017 17:01:12 -0400 Subject: [PATCH] add test case for timer types --- mapper_test.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/mapper_test.go b/mapper_test.go index 560dbb1..149dcb3 100644 --- a/mapper_test.go +++ b/mapper_test.go @@ -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{}