From 4a1802c039a0db2d97e8351c462963a99da857bf Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Mon, 5 Mar 2018 10:35:26 -0500 Subject: MM-9664 Add invalidation metrics for store caches (#8340) * Add invalidation metrics for store caches * Increment session invalidation metric * Fix tests --- store/storetest/mocks/UserStore.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'store/storetest/mocks/UserStore.go') diff --git a/store/storetest/mocks/UserStore.go b/store/storetest/mocks/UserStore.go index 7d1fd8c38..2f921ae6e 100644 --- a/store/storetest/mocks/UserStore.go +++ b/store/storetest/mocks/UserStore.go @@ -77,6 +77,11 @@ func (_m *UserStore) AnalyticsUniqueUserCount(teamId string) store.StoreChannel return r0 } +// ClearCaches provides a mock function with given fields: +func (_m *UserStore) ClearCaches() { + _m.Called() +} + // Get provides a mock function with given fields: id func (_m *UserStore) Get(id string) store.StoreChannel { ret := _m.Called(id) -- cgit v1.2.3-1-g7c22 From 302dae5bb982aad14324a4df61a018557f3dd24e Mon Sep 17 00:00:00 2001 From: Stephen Kiers Date: Fri, 9 Mar 2018 05:48:30 -0700 Subject: MM-9274- Sort Users in Channel by status (#8181) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * sort by lastActivity * added status ordering to Users * sort offline before dnd * remove data not needed * added seperate call for when order=‘status’ is on GetUser request * remove PrintLn * styling fix * remove mistake * mistake 2 * better comment * explicit if statemnt * writing tests * removed manually added mocks * generated mock * ICU-668 Added unit tests * style fix * sort by lastActivity * added status ordering to Users * sort offline before dnd * remove data not needed * added seperate call for when order=‘status’ is on GetUser request * remove PrintLn * styling fix * remove mistake * mistake 2 * better comment * explicit if statemnt * writing tests * removed manually added mocks * generated mock * ICU-668 Added unit tests * style fix * reverse dnd and offline * Fixed app.SaveStatusAndBroadcast * Fixed incorrect merge * Fixing incorrect merge again --- store/storetest/mocks/UserStore.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'store/storetest/mocks/UserStore.go') diff --git a/store/storetest/mocks/UserStore.go b/store/storetest/mocks/UserStore.go index 2f921ae6e..369a29e7a 100644 --- a/store/storetest/mocks/UserStore.go +++ b/store/storetest/mocks/UserStore.go @@ -354,6 +354,22 @@ func (_m *UserStore) GetProfilesInChannel(channelId string, offset int, limit in return r0 } +// GetProfilesInChannelByStatus provides a mock function with given fields: channelId, offset, limit +func (_m *UserStore) GetProfilesInChannelByStatus(channelId string, offset int, limit int) store.StoreChannel { + ret := _m.Called(channelId, offset, limit) + + var r0 store.StoreChannel + if rf, ok := ret.Get(0).(func(string, int, int) store.StoreChannel); ok { + r0 = rf(channelId, offset, limit) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(store.StoreChannel) + } + } + + return r0 +} + // GetProfilesNotInChannel provides a mock function with given fields: teamId, channelId, offset, limit func (_m *UserStore) GetProfilesNotInChannel(teamId string, channelId string, offset int, limit int) store.StoreChannel { ret := _m.Called(teamId, channelId, offset, limit) -- cgit v1.2.3-1-g7c22