summaryrefslogtreecommitdiffstats
path: root/api4/channel_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2018-03-05 10:35:26 -0500
committerGitHub <noreply@github.com>2018-03-05 10:35:26 -0500
commit4a1802c039a0db2d97e8351c462963a99da857bf (patch)
treef083e9cd2c21434a6eba2dca7f90c127514bf727 /api4/channel_test.go
parentfbff94f3be1bf596f2b94f593687d3b162413de9 (diff)
downloadchat-4a1802c039a0db2d97e8351c462963a99da857bf.tar.gz
chat-4a1802c039a0db2d97e8351c462963a99da857bf.tar.bz2
chat-4a1802c039a0db2d97e8351c462963a99da857bf.zip
MM-9664 Add invalidation metrics for store caches (#8340)
* Add invalidation metrics for store caches * Increment session invalidation metric * Fix tests
Diffstat (limited to 'api4/channel_test.go')
-rw-r--r--api4/channel_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/api4/channel_test.go b/api4/channel_test.go
index e65918707..51c32cf71 100644
--- a/api4/channel_test.go
+++ b/api4/channel_test.go
@@ -13,7 +13,6 @@ import (
"testing"
"github.com/mattermost/mattermost-server/model"
- "github.com/mattermost/mattermost-server/store/sqlstore"
)
func TestCreateChannel(t *testing.T) {
@@ -909,7 +908,7 @@ func TestDeleteChannel(t *testing.T) {
// successful delete by channel admin
th.MakeUserChannelAdmin(user, publicChannel6)
th.MakeUserChannelAdmin(user, privateChannel7)
- sqlstore.ClearChannelCaches()
+ th.App.Srv.Store.Channel().ClearCaches()
_, resp = Client.DeleteChannel(publicChannel6.Id)
CheckNoError(t, resp)
@@ -960,7 +959,7 @@ func TestDeleteChannel(t *testing.T) {
// // cannot delete by channel admin
th.MakeUserChannelAdmin(user, publicChannel6)
th.MakeUserChannelAdmin(user, privateChannel7)
- sqlstore.ClearChannelCaches()
+ th.App.Srv.Store.Channel().ClearCaches()
_, resp = Client.DeleteChannel(publicChannel6.Id)
CheckForbiddenStatus(t, resp)
@@ -1001,7 +1000,7 @@ func TestDeleteChannel(t *testing.T) {
// cannot delete by channel admin
th.MakeUserChannelAdmin(user, publicChannel6)
th.MakeUserChannelAdmin(user, privateChannel7)
- sqlstore.ClearChannelCaches()
+ th.App.Srv.Store.Channel().ClearCaches()
_, resp = Client.DeleteChannel(publicChannel6.Id)
CheckForbiddenStatus(t, resp)