mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 20:24:18 -06:00
45d59cf31b
Co-authored-by: nikimanoledaki <niki.manoledaki@grafana.com>
25 lines
574 B
Go
25 lines
574 B
Go
package featuremgmt
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestFeatureUsageStats(t *testing.T) {
|
|
featureManagerWithAllFeatures := WithFeatures(
|
|
"database_metrics",
|
|
"live-config",
|
|
"UPPER_SNAKE_CASE",
|
|
"feature.with.a.dot",
|
|
)
|
|
|
|
require.Equal(t, map[string]any{
|
|
"stats.features.database_metrics.count": 1,
|
|
"stats.features.live_config.count": 1,
|
|
"stats.features.upper_snake_case.count": 1,
|
|
"stats.features.feature_with_a_dot.count": 1,
|
|
}, featureManagerWithAllFeatures.GetUsageStats(context.Background()))
|
|
}
|