Alerting: Implement setting of version message in convert API. (#114331)
Part 2 of adding version messages to the `alert_rule_version` able. This allows setting the message via a header when using the Prometheus conversion API, which can be useful for e.g. linking changes back to source control.
This commit is contained in:
@@ -79,8 +79,8 @@ func TestIntegrationDirectSQLStats(t *testing.T) {
|
||||
|
||||
ruleStore := ngalertstore.SetupStoreForTesting(t, db)
|
||||
dashboardUID := "test"
|
||||
_, err = ruleStore.InsertAlertRules(context.Background(), ngmodels.NewUserUID(tempUser), []ngmodels.AlertRule{
|
||||
{
|
||||
_, err = ruleStore.InsertAlertRules(context.Background(), ngmodels.NewUserUID(tempUser), []ngmodels.InsertRule{{
|
||||
AlertRule: ngmodels.AlertRule{
|
||||
DashboardUID: &dashboardUID,
|
||||
UID: "test",
|
||||
Title: "test",
|
||||
@@ -102,7 +102,7 @@ func TestIntegrationDirectSQLStats(t *testing.T) {
|
||||
ExecErrState: ngmodels.ExecutionErrorState(ngmodels.Alerting),
|
||||
NoDataState: ngmodels.Alerting,
|
||||
IntervalSeconds: 60,
|
||||
}})
|
||||
}}})
|
||||
require.NoError(t, err)
|
||||
|
||||
_, err = dashStore.SaveDashboard(ctx, dashboards.SaveDashboardCommand{
|
||||
|
||||
Reference in New Issue
Block a user