Alerting: Remove back end logic for supporting KeepLastState (#34242)

* Removed back end logic for supporting KeepLastState

* Map keep_state correctly in migrations
This commit is contained in:
David Parrott
2021-05-18 10:55:43 -07:00
committed by GitHub
parent 0683692509
commit bbb7bbf891
7 changed files with 22 additions and 90 deletions
@@ -781,7 +781,7 @@ func TestAlertRuleCRUD(t *testing.T) {
},
},
NoDataState: apimodels.NoDataState(ngmodels.Alerting),
ExecErrState: apimodels.ExecutionErrorState(ngmodels.KeepLastStateErrState),
ExecErrState: apimodels.ExecutionErrorState(ngmodels.AlertingErrState),
},
},
},
@@ -911,7 +911,7 @@ func TestAlertRuleCRUD(t *testing.T) {
"namespace_id":1,
"rule_group":"arulegroup",
"no_data_state":"Alerting",
"exec_err_state":"KeepLastState"
"exec_err_state":"Alerting"
}
}
]
@@ -960,7 +960,7 @@ func TestAlertRuleCRUD(t *testing.T) {
},
},
NoDataState: apimodels.NoDataState(ngmodels.Alerting),
ExecErrState: apimodels.ExecutionErrorState(ngmodels.KeepLastStateErrState),
ExecErrState: apimodels.ExecutionErrorState(ngmodels.AlertingErrState),
},
},
},
@@ -1044,7 +1044,7 @@ func TestAlertRuleCRUD(t *testing.T) {
},
},
NoDataState: apimodels.NoDataState(ngmodels.Alerting),
ExecErrState: apimodels.ExecutionErrorState(ngmodels.KeepLastStateErrState),
ExecErrState: apimodels.ExecutionErrorState(ngmodels.AlertingErrState),
},
},
},
@@ -1135,7 +1135,7 @@ func TestAlertRuleCRUD(t *testing.T) {
"namespace_id":1,
"rule_group":"arulegroup",
"no_data_state":"Alerting",
"exec_err_state":"KeepLastState"
"exec_err_state":"Alerting"
}
}
]