Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 33d6e11175)
Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
46d1c1c112
commit
07bfa64bb4
@@ -45,10 +45,13 @@ func TestNotificationChannels(t *testing.T) {
|
||||
os, opa, ot, opu, ogb, ol, oth := channels.SlackAPIEndpoint, channels.PagerdutyEventAPIURL,
|
||||
channels.TelegramAPIURL, channels.PushoverEndpoint, channels.GetBoundary,
|
||||
channels.LineNotifyURL, channels.ThreemaGwBaseURL
|
||||
originalTemplate := channels.DefaultTemplateString
|
||||
channels.DefaultTemplateString = channels.TemplateForTestsString
|
||||
t.Cleanup(func() {
|
||||
channels.SlackAPIEndpoint, channels.PagerdutyEventAPIURL,
|
||||
channels.TelegramAPIURL, channels.PushoverEndpoint, channels.GetBoundary,
|
||||
channels.LineNotifyURL, channels.ThreemaGwBaseURL = os, opa, ot, opu, ogb, ol, oth
|
||||
channels.DefaultTemplateString = originalTemplate
|
||||
})
|
||||
channels.SlackAPIEndpoint = fmt.Sprintf("http://%s/slack_recvX/slack_testX", mockChannel.server.Addr)
|
||||
channels.PagerdutyEventAPIURL = fmt.Sprintf("http://%s/pagerduty_recvX/pagerduty_testX", mockChannel.server.Addr)
|
||||
|
||||
Reference in New Issue
Block a user