alertmanager/config
George Robinson 6ce841ca22
Fix scheme required for webhook url in amtool (#3509)
* Fix scheme required for webhook url in amtool

This commit fixes issue #3505 where amtool would fail with
"error: scheme required for webhook url" when using amtool
with --alertmanager.url.

The issue here is that UnmarshalYaml for WebhookConfig checks
if the scheme is present when c.URL is non-nil. However,
UnmarshalYaml for SecretURL returns a non-nil, default value
url.URL{} if the response from api/v2/status contains <secret>
as the webhook URL.

Signed-off-by: George Robinson <george.robinson@grafana.com>

* Add test for config routes test

Signed-off-by: George Robinson <george.robinson@grafana.com>

---------

Signed-off-by: George Robinson <george.robinson@grafana.com>
2023-09-05 17:53:24 +01:00
..
testdata Add support for reading VictorOps API key from file (#3111) 2022-10-25 15:40:17 +02:00
config.go update msteams configs (#3495) 2023-09-01 15:03:47 +01:00
config_test.go Changes receiver and inhibition rules arrays to slices of value items 2023-01-18 10:21:51 -05:00
coordinator.go Update golangci-lint and fix complaints (#2853) 2022-03-25 17:59:51 +01:00
coordinator_test.go Update go dependencies & switch to go-kit/log 2021-08-02 12:43:23 +02:00
notifiers.go Fix scheme required for webhook url in amtool (#3509) 2023-09-05 17:53:24 +01:00
notifiers_test.go Merge pull request #3226 from an5t/telegram-token-file 2023-04-06 17:15:17 +02:00