From 4fb2183437728b5107b27323ff1520de0fa21203 Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Fri, 26 Jul 2024 11:21:58 +0200 Subject: [PATCH] Test a couple more cases without suffix gen Signed-off-by: Arve Knudsen --- storage/remote/otlptranslator/prometheus/normalize_name_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/remote/otlptranslator/prometheus/normalize_name_test.go b/storage/remote/otlptranslator/prometheus/normalize_name_test.go index ee25bb2df..07b9b0a78 100644 --- a/storage/remote/otlptranslator/prometheus/normalize_name_test.go +++ b/storage/remote/otlptranslator/prometheus/normalize_name_test.go @@ -200,4 +200,6 @@ func TestBuildCompliantNameWithoutSuffixes(t *testing.T) { require.Equal(t, "envoy__rule_engine_zlib_buf_error", BuildCompliantName(createGauge("envoy__rule_engine_zlib_buf_error", ""), "", false)) require.Equal(t, ":foo::bar", BuildCompliantName(createGauge(":foo::bar", ""), "", false)) require.Equal(t, ":foo::bar", BuildCompliantName(createCounter(":foo::bar", ""), "", false)) + require.Equal(t, "foo_bar", BuildCompliantName(createGauge("foo.bar", "1"), "", false)) + require.Equal(t, "system_io", BuildCompliantName(createCounter("system.io", "foo/bar"), "", false)) }