mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-11 22:07:27 -08:00
Include colon in BuildCompliantMetricName test
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
This commit is contained in:
parent
3a99b929d0
commit
f8bc738548
|
@ -204,7 +204,9 @@ func TestBuildCompliantMetricNameWithSuffixes(t *testing.T) {
|
|||
// Slashes in units are converted.
|
||||
require.Equal(t, "system_io_foo_per_bar_total", BuildCompliantMetricName(createCounter("system.io", "foo/bar"), "", true))
|
||||
require.Equal(t, "metric_with_foreign_characters_total", BuildCompliantMetricName(createCounter("metric_with_字符_foreign_characters", ""), "", true))
|
||||
require.Equal(t, "temperature_C", BuildCompliantMetricName(createGauge("temperature", "%*()°C"), "", true)) // Removes non aplhanumerical characters from units
|
||||
|
||||
// Removes non aplhanumerical characters from units, but leaves colons.
|
||||
require.Equal(t, "temperature_:C", BuildCompliantMetricName(createGauge("temperature", "%*()°:C"), "", true))
|
||||
}
|
||||
|
||||
func TestBuildCompliantMetricNameWithoutSuffixes(t *testing.T) {
|
||||
|
|
Loading…
Reference in a new issue