grafana/pkg/tests/api/alerting
Yuri Tseretyan d58ea37268
Alerting: Reject imported configs with unsupported receiver fields (#125906)
* Alerting: Reject imported configs with unsupported receiver fields

Imported Prometheus/Mimir Alertmanager configs that use receiver fields
Grafana cannot represent (e.g. the *_file / *_ref fields removed in
grafana/alerting#573) were silently dropped during conversion.

Validate now round-trips each receiver through the upstream<->definition
conversion and rejects any field that does not survive, listing the
offending receivers and their YAML field paths in the error's "extra"
payload. Detection is generic, so it stays correct as upstream adds fields.

* Alerting: Add integration test for unsupported receiver fields import

Asserts POST /convert/api/v1/alerts rejects a config whose receiver uses a
field Grafana cannot represent (auth_password_file), returns the YAML field
path, and stores nothing.

* improve test
2026-06-05 09:15:12 -04:00
..
test-data Alerting: Update alerting module to 14235582749811866551d16c5f88ce0c7ad957a2 (#119748) 2026-03-06 19:00:21 -05:00
api_admin_configuration_test.go Chore: Remove remaining ptr constructor helper functions (#124553) 2026-05-11 21:00:39 +03:00
api_alertmanager_silence_test.go Replace check for integration tests. (#110707) 2025-09-08 15:49:49 +02:00
api_alertmanager_test.go Chore: use new(value) rather than pointer helpers (#124525) 2026-05-10 21:32:18 +02:00
api_available_channel_test.go Alerting: Migrate to integration schema (#111643) 2025-09-26 09:31:50 -04:00
api_backtesting_test.go Alerting: Rule backtesting with experimental UI (#115525) 2025-12-26 16:55:57 -05:00
api_convert_prometheus_alertmanager_test.go Alerting: Reject imported configs with unsupported receiver fields (#125906) 2026-06-05 09:15:12 -04:00
api_convert_prometheus_notification_settings_test.go Chore: use new(value) rather than pointer helpers (#124525) 2026-05-10 21:32:18 +02:00
api_convert_prometheus_test.go Chore: use new(value) rather than pointer helpers (#124525) 2026-05-10 21:32:18 +02:00
api_namespace_test.go Replace check for integration tests. (#110707) 2025-09-08 15:49:49 +02:00
api_notification_channel_test.go Alerting: Create PostableUserConfig domain layer model AMConfigV1 (#125154) 2026-05-20 14:20:43 -04:00
api_prometheus_test.go Chore: use new(value) rather than pointer helpers (#124525) 2026-05-10 21:32:18 +02:00
api_provisioning_access_control_test.go Alerting: Update provisioning APIs to accept resource-specific permissions (#120552) 2026-03-19 15:00:29 -04:00
api_provisioning_test.go Chore: use new(value) rather than pointer helpers (#124525) 2026-05-10 21:32:18 +02:00
api_remote_alertmanager_test.go Alerting: remove MergeMatchers from ExtraConfiguration (#124856) 2026-05-20 09:09:46 -04:00
api_ruler_pause_test.go Chore: use new(value) rather than pointer helpers (#124525) 2026-05-10 21:32:18 +02:00
api_ruler_test.go Chore: use new(value) rather than pointer helpers (#124525) 2026-05-10 21:32:18 +02:00
api_testing_test.go Alerting: Add expression type information to webhook valueString (#112312) 2025-12-02 22:03:17 +01:00
high_availability_test.go Chore: Bump promlib v0.0.11 (#123736) 2026-04-30 17:30:31 +02:00
testing.go Alerting: Remove legacy TestReceivers endpoint and supporting code (#121692) 2026-04-02 06:46:49 +00:00