mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Allow provenance disable in alerting provisioning API (#63650)
* Allow provenance None in alert rule update and rule group replace * Allow provenance None in contact point update * Allow updating policies to none by sending x-disable-provenance header * Allow mute timings to disable provenance with x-disable-provenance header * Allow disabling provenance by using x-disable-provenance header * Add provenance helper to lower the cyclomatic complexity * Do not downgrade provenance except un ReplaceRuleGroup * Add function explanation and change error handling * Add docs for x-disable-provenance changes (#66300) * Add docs for x-disable-provenance changes * Apply suggestions from code review Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update _index.md --------- Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/set-up/provision-alerting-resources/_index.md Co-authored-by: George Robinson <george.robinson@grafana.com> * Add error message check in tests * Change docs --------- Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> Co-authored-by: George Robinson <george.robinson@grafana.com>
This commit is contained in:
@@ -274,10 +274,10 @@ func TestAlertRuleService(t *testing.T) {
|
||||
errNil: false,
|
||||
},
|
||||
{
|
||||
name: "should not be able to update from provenance api to none",
|
||||
name: "should be able to update from provenance api to none",
|
||||
from: models.ProvenanceAPI,
|
||||
to: models.ProvenanceNone,
|
||||
errNil: false,
|
||||
errNil: true,
|
||||
},
|
||||
{
|
||||
name: "should not be able to update from provenance file to api",
|
||||
|
||||
Reference in New Issue
Block a user