From c4974374d9840caa6ec496c138a6220dd40afa54 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Thu, 8 Dec 2016 07:18:15 -0800 Subject: 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 --- api/admin_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'api/admin_test.go') 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() -- cgit v1.2.3-1-g7c22