diff options
author | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2018-07-11 12:58:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-11 12:58:16 +0200 |
commit | 7ed712f938588491da35b1d04b7f44700975c70b (patch) | |
tree | 45586bdbefda64408c0cc1c3e34e7fd8d1b2004a /api4/post_test.go | |
parent | 7c08ff99864721956d1496b8114fa54dd33569f0 (diff) | |
download | chat-7ed712f938588491da35b1d04b7f44700975c70b.tar.gz chat-7ed712f938588491da35b1d04b7f44700975c70b.tar.bz2 chat-7ed712f938588491da35b1d04b7f44700975c70b.zip |
Restore config after finisht the test case (#9085)
Diffstat (limited to 'api4/post_test.go')
-rw-r--r-- | api4/post_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/api4/post_test.go b/api4/post_test.go index 63d71b5bd..720fdc410 100644 --- a/api4/post_test.go +++ b/api4/post_test.go @@ -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" |