diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-31 09:39:31 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-10-31 10:39:31 -0400 |
commit | ce2b2be5de578bd9eb44b26e04db75ca61d67ca5 (patch) | |
tree | 54203a18ecfb167dcf1d7e0742cea0ed9aab220a /app/post_test.go | |
parent | b446d0aa0aa2bd3d87028b0543752eb539507481 (diff) | |
download | chat-ce2b2be5de578bd9eb44b26e04db75ca61d67ca5.tar.gz chat-ce2b2be5de578bd9eb44b26e04db75ca61d67ca5.tar.bz2 chat-ce2b2be5de578bd9eb44b26e04db75ca61d67ca5.zip |
Refactoring cfg refs and load / save functions (#7749)
* refactoring cfg refs and load / save functions
* improve error output
Diffstat (limited to 'app/post_test.go')
-rw-r--r-- | app/post_test.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/post_test.go b/app/post_test.go index 24910f964..e2e9a7261 100644 --- a/app/post_test.go +++ b/app/post_test.go @@ -15,7 +15,6 @@ import ( "github.com/stretchr/testify/require" "github.com/mattermost/mattermost-server/model" - "github.com/mattermost/mattermost-server/utils" ) func TestUpdatePostEditAt(t *testing.T) { @@ -82,11 +81,9 @@ func TestPostAction(t *testing.T) { th := Setup().InitBasic() defer th.TearDown() - allowedInternalConnections := *utils.Cfg.ServiceSettings.AllowedUntrustedInternalConnections - defer func() { - utils.Cfg.ServiceSettings.AllowedUntrustedInternalConnections = &allowedInternalConnections - }() - *utils.Cfg.ServiceSettings.AllowedUntrustedInternalConnections = "localhost 127.0.0.1" + th.App.UpdateConfig(func(cfg *model.Config) { + *cfg.ServiceSettings.AllowedUntrustedInternalConnections = "localhost 127.0.0.1" + }) ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { var request model.PostActionIntegrationRequest |