grafana/pkg/services/ngalert/notifier
gotjosh 0bfe150928
Alerting: Fix Test Receivers when settings are non-strings (#62156)
* Alerting: Fix Test Receivers when settings are non-strings

As part of the Alerting extraction, we want to make sure we don't have circular depedencies. As such, I had to move `PostableGrafanaReceiver` to a new struct in `grafana/alerting` called `GrafanaReceiver`.

`PostableGrafanaReceiver` has an attribute called `Settings` that uses a Grafana-propietary struct called `RawMessage`, this struct shadows `json.RawMessage`.

When I created `GrafanaReceiver`, I turned settings into a `map[string]string` thinking all settings would end up as strings. This was a mistake, and this test proves that it doesn't work, and breaks the API.
2023-01-26 12:54:03 +00:00
..
channels_config Docs: Rename Message templates to Notification templates (#59477) 2023-01-18 17:26:34 +00:00
alertmanager_config.go Docs: Rename Message templates to Notification templates (#59477) 2023-01-18 17:26:34 +00:00
alertmanager_test.go Alerting: Remove unused code after importing from grafana/alerting (#61869) 2023-01-23 10:30:10 +00:00
alertmanager.go Alerting: Remove unused code after importing from grafana/alerting (#61869) 2023-01-23 10:30:10 +00:00
alerts.go Alerting: Use alerting.GrafanaAlertmanager instead of initialising Alertmanager components directly (#61230) 2023-01-13 12:54:38 -04:00
config_test.go Remove ioutil.ReadDir from usage (#53550) 2022-08-11 07:21:12 -04:00
config.go Update grafana/alerting to the latest main (#61810) 2023-01-19 20:44:49 +00:00
crypto.go Alerting: Logs should not be capitalized and the errors key should be "err" (#50333) 2022-06-07 19:54:23 +02:00
email_test.go chore: move notifications models into notifications service (#61638) 2023-01-17 14:47:31 -05:00
file_store_test.go Handle ioutil deprecations (#53526) 2022-08-10 15:37:51 +02:00
file_store.go Alerting Unification: Use the State interface from the alerting package (#61333) 2023-01-11 19:50:45 -04:00
images.go Alerting: import Grafana alerting package and update usages (#60490) 2022-12-19 10:53:58 -05:00
log.go Alerting: import Grafana alerting package and update usages (#60490) 2022-12-19 10:53:58 -05:00
multiorg_alertmanager_test.go Alerting: Use alerting.GrafanaAlertmanager instead of initialising Alertmanager components directly (#61230) 2023-01-13 12:54:38 -04:00
multiorg_alertmanager.go Chore: Fix "manger" typo (#61649) 2023-01-17 23:13:27 +00:00
receivers_test.go Update grafana/alerting to the latest main (#61810) 2023-01-19 20:44:49 +00:00
receivers.go Alerting: Fix Test Receivers when settings are non-strings (#62156) 2023-01-26 12:54:03 +00:00
sender.go chore: move notifications models into notifications service (#61638) 2023-01-17 14:47:31 -05:00
silences.go Alerting: Use alerting.GrafanaAlertmanager instead of initialising Alertmanager components directly (#61230) 2023-01-13 12:54:38 -04:00
status.go Alerting: Use alerting.GrafanaAlertmanager instead of initialising Alertmanager components directly (#61230) 2023-01-13 12:54:38 -04:00
testing.go Alerting: Delete expired images from the database (#53236) 2022-08-09 15:28:36 +01:00