From 568f744f2e91003777b6249e0ebe60fe93da445a Mon Sep 17 00:00:00 2001 From: Simon Westphahl Date: Thu, 14 Jun 2018 14:27:28 +0200 Subject: [PATCH] Tests for metric type mapping config Co-authored-by: Simon Westphahl Signed-off-by: Simon Westphahl --- mapper_test.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/mapper_test.go b/mapper_test.go index 3605e3d..625d55e 100644 --- a/mapper_test.go +++ b/mapper_test.go @@ -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,