FeatureFlags: Avoid using cfg.IsFeatureToggleEnabled (#81407)

This commit is contained in:
Ryan McKinley
2024-01-28 15:22:45 -08:00
committed by GitHub
parent 1a1531ca5e
commit 1fab107e79
21 changed files with 248 additions and 387 deletions
@@ -5,10 +5,11 @@ import (
"net/url"
"testing"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/setting"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/services/featuremgmt"
"github.com/grafana/grafana/pkg/setting"
)
type databaseConfigTest struct {
@@ -109,7 +110,7 @@ func TestIntegrationSQLConnectionString(t *testing.T) {
for _, testCase := range databaseConfigTestCases {
t.Run(testCase.name, func(t *testing.T) {
cfg := makeDatabaseTestConfig(t, testCase)
dbCfg, err := NewDatabaseConfig(cfg)
dbCfg, err := NewDatabaseConfig(cfg, testCase.features)
require.Equal(t, testCase.err, err)
if testCase.expConnStr != "" {
assert.Equal(t, testCase.expConnStr, dbCfg.ConnectionString)