[MM-49243] - Use paged requests to request the list of teams (#26278)
Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
087c993bed
Коммит
4bbcfd74ad
@@ -40,10 +40,16 @@ func (s *MmctlUnitTestSuite) TestListWebhookCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetAllTeams(context.TODO(), "", 0, 100000000).
|
||||
GetAllTeams(context.TODO(), "", 0, DefaultPageSize).
|
||||
Return([]*model.Team{&mockTeam}, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetAllTeams(context.TODO(), "", 1, DefaultPageSize).
|
||||
Return([]*model.Team{}, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetIncomingWebhooksForTeam(context.TODO(), teamID, 0, 100000000, "").
|
||||
@@ -114,10 +120,16 @@ func (s *MmctlUnitTestSuite) TestListWebhookCmd() {
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetAllTeams(context.TODO(), "", 0, 100000000).
|
||||
GetAllTeams(context.TODO(), "", 0, DefaultPageSize).
|
||||
Return([]*model.Team{&mockTeam}, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetAllTeams(context.TODO(), "", 1, DefaultPageSize).
|
||||
Return([]*model.Team{}, &model.Response{}, nil).
|
||||
Times(1)
|
||||
|
||||
s.client.
|
||||
EXPECT().
|
||||
GetIncomingWebhooksForTeam(context.TODO(), teamID, 0, 100000000, "").
|
||||
|
||||
Ссылка в новой задаче
Block a user