mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 13:22:03 +08:00
CloudMigrations: Add config for alert rules state behavior and remove experimental feature toggle on alerts migration (#97254)
* CloudMigrations: add config for controlling alert rules state behavior * CloudMigrations: remove experimental 'onPremToCloudMigrationsAlerts' feature toggle
This commit is contained in:
@ -826,7 +826,9 @@ func ctxWithSignedInUser() context.Context {
|
||||
return ctx
|
||||
}
|
||||
|
||||
func setUpServiceTest(t *testing.T, withDashboardMock bool) cloudmigration.Service {
|
||||
type configOverrides func(c *setting.Cfg)
|
||||
|
||||
func setUpServiceTest(t *testing.T, withDashboardMock bool, cfgOverrides ...configOverrides) cloudmigration.Service {
|
||||
sqlStore := db.InitTestDB(t)
|
||||
secretsService := secretsfakes.NewFakeSecretsService()
|
||||
rr := routing.NewRouteRegister()
|
||||
@ -866,7 +868,6 @@ func setUpServiceTest(t *testing.T, withDashboardMock bool) cloudmigration.Servi
|
||||
|
||||
featureToggles := featuremgmt.WithFeatures(
|
||||
featuremgmt.FlagOnPremToCloudMigrations,
|
||||
featuremgmt.FlagOnPremToCloudMigrationsAlerts,
|
||||
featuremgmt.FlagDashboardRestore, // needed for skipping creating soft-deleted dashboards in the snapshot.
|
||||
)
|
||||
|
||||
@ -930,6 +931,10 @@ func setUpServiceTest(t *testing.T, withDashboardMock bool) cloudmigration.Servi
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
for _, cfgOverride := range cfgOverrides {
|
||||
cfgOverride(cfg)
|
||||
}
|
||||
|
||||
s, err := ProvideService(
|
||||
cfg,
|
||||
httpclient.NewProvider(),
|
||||
|
Reference in New Issue
Block a user