[MM-49243] - Use paged requests to request the list of teams (#26278)

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Elton Goh Jun Hao
2024-04-04 16:09:15 +08:00
коммит произвёл GitHub
родитель 087c993bed
Коммит 4bbcfd74ad
8 изменённых файлов: 38 добавлений и 11 удалений

Просмотреть файл

@@ -69,10 +69,16 @@ func (s *MmctlUnitTestSuite) TestSearchChannelCmdF() {
s.client.
EXPECT().
GetAllTeams(context.TODO(), "", 0, 9999).
GetAllTeams(context.TODO(), "", 0, DefaultPageSize).
Return(mockTeams, &model.Response{}, nil).
Times(1)
s.client.
EXPECT().
GetAllTeams(context.TODO(), "", 1, DefaultPageSize).
Return([]*model.Team{}, &model.Response{}, nil).
Times(1)
// first call is for the other team, that doesn't have the channel
s.client.
EXPECT().