mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-9664 Add invalidation metrics for store caches (#8340)
* Add invalidation metrics for store caches * Increment session invalidation metric * Fix tests
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user