From cc2c2890f5272a129b6d29f4870c61181f15c152 Mon Sep 17 00:00:00 2001 From: Vincent Foley Date: Fri, 18 Mar 2022 09:42:30 -0400 Subject: [PATCH] Add failing test from #289 --- metrics-exporter-prometheus/src/formatting.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/metrics-exporter-prometheus/src/formatting.rs b/metrics-exporter-prometheus/src/formatting.rs index f95f6d3e..3e90a304 100644 --- a/metrics-exporter-prometheus/src/formatting.rs +++ b/metrics-exporter-prometheus/src/formatting.rs @@ -226,7 +226,13 @@ mod tests { #[test] fn test_sanitize_metric_name_known_cases() { - let cases = &[("*", "_"), ("\"", "_"), ("foo_bar", "foo_bar"), ("1foobar", "_foobar")]; + let cases = &[ + ("*", "_"), + ("\"", "_"), + ("foo_bar", "foo_bar"), + ("foo1_bar", "foo1_bar"), + ("1foobar", "_foobar"), + ]; for (input, expected) in cases { let result = sanitize_metric_name(input);