diff options
author | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2017-03-14 13:52:27 +0100 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-03-14 08:52:27 -0400 |
commit | d03367c56005470396d883d273323ecbd8d4f243 (patch) | |
tree | 921b6e459c367b9172809bc63a218711566b304d /api4/system_test.go | |
parent | ee457176bd0c4442358df089044b87eb75fe7569 (diff) | |
download | chat-d03367c56005470396d883d273323ecbd8d4f243.tar.gz chat-d03367c56005470396d883d273323ecbd8d4f243.tar.bz2 chat-d03367c56005470396d883d273323ecbd8d4f243.zip |
Add implementation for POST /config/reload apiV4 - Reload Configuration (#5713)
Diffstat (limited to 'api4/system_test.go')
-rw-r--r-- | api4/system_test.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/api4/system_test.go b/api4/system_test.go index 36ae347dd..cb6ca7b81 100644 --- a/api4/system_test.go +++ b/api4/system_test.go @@ -66,6 +66,27 @@ func TestGetConfig(t *testing.T) { } } +func TestReloadConfig(t *testing.T) { + th := Setup().InitBasic().InitSystemAdmin() + defer TearDown() + Client := th.Client + + flag, resp := Client.ReloadConfig() + CheckForbiddenStatus(t, resp) + if flag == true { + t.Fatal("should not Reload the config due no permission.") + } + + flag, resp = th.SystemAdminClient.ReloadConfig() + CheckNoError(t, resp) + if flag == false { + t.Fatal("should Reload the config") + } + + utils.Cfg.TeamSettings.MaxUsersPerTeam = 50 + *utils.Cfg.TeamSettings.EnableOpenServer = true +} + func TestEmailTest(t *testing.T) { th := Setup().InitBasic().InitSystemAdmin() defer TearDown() |