[MM-56398] Fix date range query for user reporting (#25960)
* [MM-56398] Fix date range query for user reporting * Missing debug stuff * Fix tests
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
81de078e1d
Коммит
bbe432b3b0
@@ -6400,6 +6400,20 @@ func testGetUserReport(t *testing.T, rctx request.CTX, ss store.Store) {
|
||||
require.Equal(t, users[60].Username, userReport[0].Username)
|
||||
})
|
||||
|
||||
t.Run("should return all users regardless of date range", func(t *testing.T) {
|
||||
userReport, err := ss.User().GetUserReport(&model.UserReportOptions{
|
||||
ReportingBaseOptions: model.ReportingBaseOptions{
|
||||
SortColumn: "Username",
|
||||
PageSize: 50,
|
||||
StartAt: now.AddDate(1000, 0, 0).UnixMilli(),
|
||||
EndAt: now.AddDate(1000, 0, 0).UnixMilli(),
|
||||
},
|
||||
})
|
||||
|
||||
require.NoError(t, err)
|
||||
require.Len(t, userReport, 50)
|
||||
})
|
||||
|
||||
t.Run("should return accurate post stats for various date ranges", func(t *testing.T) {
|
||||
userReport, err := ss.User().GetUserReport(&model.UserReportOptions{
|
||||
ReportingBaseOptions: model.ReportingBaseOptions{
|
||||
|
||||
Ссылка в новой задаче
Block a user