diff options
author | Corey Hulen <corey@hulen.com> | 2016-12-08 07:18:15 -0800 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-12-08 10:18:15 -0500 |
commit | c4974374d9840caa6ec496c138a6220dd40afa54 (patch) | |
tree | c450cb63b76e032412f3e9c4433bae9518c89513 /api/admin_test.go | |
parent | 7acd135e021de28bac61e65d5293be8a4f0df328 (diff) | |
download | chat-c4974374d9840caa6ec496c138a6220dd40afa54.tar.gz chat-c4974374d9840caa6ec496c138a6220dd40afa54.tar.bz2 chat-c4974374d9840caa6ec496c138a6220dd40afa54.zip |
PLT-4853 Adding cache purging to the server (server) (#4735)
* PLT-4853 Adding caching invalidation to HA
* PLT-4853 Adding cach purging to the server
Diffstat (limited to 'api/admin_test.go')
-rw-r--r-- | api/admin_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/api/admin_test.go b/api/admin_test.go index e1520877c..e11835380 100644 --- a/api/admin_test.go +++ b/api/admin_test.go @@ -116,6 +116,18 @@ func TestReloadConfig(t *testing.T) { *utils.Cfg.TeamSettings.EnableOpenServer = true } +func TestInvalidateAllCache(t *testing.T) { + th := Setup().InitBasic().InitSystemAdmin() + + if _, err := th.BasicClient.InvalidateAllCaches(); err == nil { + t.Fatal("Shouldn't have permissions") + } + + if _, err := th.SystemAdminClient.InvalidateAllCaches(); err != nil { + t.Fatal(err) + } +} + func TestSaveConfig(t *testing.T) { th := Setup().InitBasic().InitSystemAdmin() |