Alerting: Publish event when one or more rules are created or changed (#93637)

* Publish event when one or more rules are changed

* Publish affected rules

* Use a fake bus to test publish event without listening

* Wire alerting store into provisioning service
This commit is contained in:
William Wernert authored and GitHub committed 2024-10-11 12:19:52 -04:00
1 parent 18e66d22b1
commit 19a9a79467
14 files changed
+238 -114

No files matched your search

@@ -782,7 +782,7 @@ func setUpServiceTest(t *testing.T, withDashboardMock bool) cloudmigration.Servi
fakeAccessControlService := actest.FakeService{}
alertMetrics := metrics.NewNGAlert(prometheus.NewRegistry())
ruleStore, err := ngalertstore.ProvideDBStore(cfg, featureToggles, sqlStore, mockFolder, dashboardService, fakeAccessControl)
ruleStore, err := ngalertstore.ProvideDBStore(cfg, featureToggles, sqlStore, mockFolder, dashboardService, fakeAccessControl, bus)
require.NoError(t, err)
ng, err := ngalert.ProvideService(