* update to alerting 20230418161049-5f374e58cb32
* rename renamed structs in https://github.com/grafana/alerting/pull/73
* update ValidateContactPoint to use BuildReceiverConfiguration
* update logger factory according to changes
* rewrite integration builder
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
err:fmt.Errorf("failed to validate receiver \"SlackWithBadURL\" of type \"slack\": failed to parse notifier SlackWithBadURL (UID: test-uid): invalid URL %q",invalidUri),
err:fmt.Errorf("failed to validate integration \"SlackWithBadURL\" (UID test-uid) of type \"slack\": invalid URL %q",invalidUri),
},
{
name:"when a slack receiver has an invalid recipient - it should not error",
require.Equal(t,`failed to save and apply Alertmanager configuration: failed to build integration map: the receiver is invalid: failed to validate receiver "slack.receiver" of type "slack": token must be specified when using the Slack chat API`,res["message"])
require.Regexp(t,`^failed to save and apply Alertmanager configuration: failed to build integration map: failed to validate integration "slack.receiver" \(UID [^\)]+\) of type "slack": token must be specified when using the Slack chat API`,res["message"])
require.Regexp(t,`failed to validate integration "receiver-1" \(UID[^\)]+\) of type "email": could not find addresses in settings`,result.Receivers[0].Configs[0].Error)
require.Regexp(t,`failed to validate integration "receiver-1" \(UID[^\)]+\) of type "email": could not find addresses in settings`,result.Receivers[0].Configs[0].Error)