Alerting: use alerting GrafanaReceiver and BuildReceiverConfiguration in Grafana (#65224)

* replace receiver errors with one from alerting
* add the converter to alerting models
* update buildReceiverIntegration to accept GrafanaReceiver
---------

Co-authored-by: George Robinson <george.robinson@grafana.com>
This commit is contained in:
Yuri Tseretyan
2023-04-13 12:25:32 -04:00
committed by GitHub
co-authored by George Robinson
parent e5e0a1cbbf
commit afd52d0866
10 changed files with 209 additions and 90 deletions
@@ -108,7 +108,7 @@ func TestStatusForTestReceivers(t *testing.T) {
Name: "test1",
UID: "uid1",
Status: "failed",
Error: notifier.InvalidReceiverError{},
Error: alertingNotify.InvalidReceiverError{},
}},
}, {
Name: "test2",
@@ -116,7 +116,7 @@ func TestStatusForTestReceivers(t *testing.T) {
Name: "test2",
UID: "uid2",
Status: "failed",
Error: notifier.InvalidReceiverError{},
Error: alertingNotify.InvalidReceiverError{},
}},
}}))
})
@@ -148,7 +148,7 @@ func TestStatusForTestReceivers(t *testing.T) {
Name: "test1",
UID: "uid1",
Status: "failed",
Error: notifier.InvalidReceiverError{},
Error: alertingNotify.InvalidReceiverError{},
}},
}, {
Name: "test2",
@@ -156,7 +156,7 @@ func TestStatusForTestReceivers(t *testing.T) {
Name: "test2",
UID: "uid2",
Status: "failed",
Error: notifier.ReceiverTimeoutError{},
Error: alertingNotify.ReceiverTimeoutError{},
}},
}}))
})