From 0871857343b4649589e175f4d40a3dc987673814 Mon Sep 17 00:00:00 2001 From: kittyandrew Date: Wed, 6 May 2026 19:52:45 +0300 Subject: [PATCH] nixos/tests/grafana-to-ntfy: use new k8s receiver-test endpoint Grafana 13 removed POST /api/alertmanager/grafana/config/api/v1/receivers/test (grafana/grafana#121692, returns 410 Gone), causing passthru.tests.grafana-to-ntfy to fail on master. Switch to the k8s-style replacement under notifications.alerting.grafana.app/v1beta1, using name="-" to test an ad-hoc integration without needing a receiver UID lookup. --- nixos/tests/grafana-to-ntfy.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/tests/grafana-to-ntfy.nix b/nixos/tests/grafana-to-ntfy.nix index d7e942296e3a..f7d3dd487f13 100644 --- a/nixos/tests/grafana-to-ntfy.nix +++ b/nixos/tests/grafana-to-ntfy.nix @@ -148,10 +148,10 @@ in with subtest("Grafana alert arrives at ntfy"): machine.succeed( - "curl -sf http://127.0.0.1:${toString ports.grafana}/api/alertmanager/grafana/config/api/v1/receivers/test" + "curl -sf http://127.0.0.1:${toString ports.grafana}/apis/notifications.alerting.grafana.app/v1beta1/namespaces/default/receivers/-/test" " -u admin:admin" " -X POST -H 'Content-Type: application/json'" - """ -d '{"receivers": [{"name": "grafana-to-ntfy", "grafana_managed_receiver_configs": [{"uid": "cp_webhook", "name": "webhook", "type": "webhook", "disableResolveMessage": false, "settings": {"url": "http://127.0.0.1:${toString ports.grafana-to-ntfy}", "httpMethod": "POST"}}]}]}'""" + """ -d '{"alert": {"labels": {"alertname": "test-alert"}, "annotations": {}}, "integration": {"type": "webhook", "settings": {"url": "http://127.0.0.1:${toString ports.grafana-to-ntfy}", "httpMethod": "POST"}}}'""" ) # grep ensures we wait for the Grafana message specifically (see above) resp = machine.wait_until_succeeds(