Alerting: Fix route validation in provisioning service (#107550)
* introduce ExtraConfigsCrypto * delete getLastConfiguration and move all code into method Get * update legacy store to encrypt ExtraConfigs same way we do in MultiOrgAlertmanager * update legacy store init * delete PersistConfig * remove unnecessary unmarshalling * add better error * add tests for legacy store * add tests that cover extra config validation * add integration test for conflicting routes --------- Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
@@ -2034,7 +2034,7 @@ func createProvisioningSrvSut(t *testing.T) ProvisioningSrv {
|
||||
func createProvisioningSrvSutFromEnv(t *testing.T, env *testEnvironment) ProvisioningSrv {
|
||||
t.Helper()
|
||||
tracer := tracing.InitializeTracerForTest()
|
||||
configStore := legacy_storage.NewAlertmanagerConfigStore(env.configs)
|
||||
configStore := legacy_storage.NewAlertmanagerConfigStore(env.configs, notifier.NewExtraConfigsCrypto(env.secrets))
|
||||
receiverSvc := notifier.NewReceiverService(
|
||||
ac.NewReceiverAccess[*models.Receiver](env.ac, true),
|
||||
configStore,
|
||||
|
||||
Reference in New Issue
Block a user