[MM-49989] Pass a context.Context to Client4 methods (#22922)
* Migrate all method in model/client4.go to accept a context.Context * Fix th.*Client * Fix remaining issues * Empty commit to triger CI * Fix test * Add cancellation test * Test that returned error is context.Canceled * Fix bad merge * Update mmctl code --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7116e9267a
Коммит
6c82605df0
@@ -4,6 +4,8 @@
|
||||
package slashcommands
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/mattermost/mattermost-server/server/public/model"
|
||||
"github.com/mattermost/mattermost-server/server/v8/channels/utils"
|
||||
)
|
||||
@@ -57,7 +59,7 @@ func (cfg *AutoTeamCreator) createRandomTeam() (*model.Team, error) {
|
||||
Type: model.TeamOpen,
|
||||
}
|
||||
|
||||
createdTeam, _, err := cfg.client.CreateTeam(team)
|
||||
createdTeam, _, err := cfg.client.CreateTeam(context.Background(), team)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user