The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/services/featuremgmt/service_test.go

20 lines
482 B

package featuremgmt
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/setting"
)
func TestFeatureService(t *testing.T) {
cfg := setting.NewCfg()
mgmt, err := ProvideManagerService(cfg)
require.NoError(t, err)
require.NotNil(t, mgmt)
// Enterprise features do not fall though automatically
require.False(t, mgmt.IsEnabledGlobally("a.yes.default"))
require.False(t, mgmt.IsEnabledGlobally("a.yes")) // licensed, but not enabled
}