Restore config after finisht the test case (#9085)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7c08ff9986
Коммит
7ed712f938
@@ -170,6 +170,15 @@ func testCreatePostWithOutgoingHook(
|
||||
team := th.BasicTeam
|
||||
channel := th.BasicChannel
|
||||
|
||||
enableOutgoingWebhooks := th.App.Config().ServiceSettings.EnableOutgoingWebhooks
|
||||
allowedUntrustedInternalConnections := th.App.Config().ServiceSettings.AllowedUntrustedInternalConnections
|
||||
defer func() {
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableOutgoingWebhooks = enableOutgoingWebhooks })
|
||||
th.App.UpdateConfig(func(cfg *model.Config) {
|
||||
cfg.ServiceSettings.AllowedUntrustedInternalConnections = allowedUntrustedInternalConnections
|
||||
})
|
||||
}()
|
||||
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { cfg.ServiceSettings.EnableOutgoingWebhooks = true })
|
||||
th.App.UpdateConfig(func(cfg *model.Config) {
|
||||
*cfg.ServiceSettings.AllowedUntrustedInternalConnections = "localhost 127.0.0.1"
|
||||
|
||||
Ссылка в новой задаче
Block a user