Migrate to stateless app.App (#17542)
* add request context * move initialialization to server * use app interface instead of global app functions * remove app context from webconn * cleanup * remove duplicated services * move context to separate package * remove finalize init method and move content to NewServer function * restart workers and schedulers after adding license for tests * reflect review comments Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c09369f14a
Коммит
5ea06e51d0
@@ -67,7 +67,7 @@ func TestGroupMsgProvider(t *testing.T) {
|
||||
th.removePermissionFromRole(model.PERMISSION_CREATE_GROUP_CHANNEL.Id, model.SYSTEM_USER_ROLE_ID)
|
||||
|
||||
t.Run("Check without permission to create a GM channel.", func(t *testing.T) {
|
||||
resp := cmd.DoCommand(th.App, &model.CommandArgs{
|
||||
resp := cmd.DoCommand(th.App, th.Context, &model.CommandArgs{
|
||||
T: i18n.IdentityTfunc(),
|
||||
SiteURL: "http://test.url",
|
||||
TeamId: team.Id,
|
||||
@@ -83,7 +83,7 @@ func TestGroupMsgProvider(t *testing.T) {
|
||||
t.Run("Check without permissions to view a user in the list.", func(t *testing.T) {
|
||||
th.removePermissionFromRole(model.PERMISSION_VIEW_MEMBERS.Id, model.SYSTEM_USER_ROLE_ID)
|
||||
defer th.addPermissionToRole(model.PERMISSION_VIEW_MEMBERS.Id, model.SYSTEM_USER_ROLE_ID)
|
||||
resp := cmd.DoCommand(th.App, &model.CommandArgs{
|
||||
resp := cmd.DoCommand(th.App, th.Context, &model.CommandArgs{
|
||||
T: i18n.IdentityTfunc(),
|
||||
SiteURL: "http://test.url",
|
||||
TeamId: team.Id,
|
||||
@@ -95,7 +95,7 @@ func TestGroupMsgProvider(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("Check with permission to create a GM channel.", func(t *testing.T) {
|
||||
resp := cmd.DoCommand(th.App, &model.CommandArgs{
|
||||
resp := cmd.DoCommand(th.App, th.Context, &model.CommandArgs{
|
||||
T: i18n.IdentityTfunc(),
|
||||
SiteURL: "http://test.url",
|
||||
TeamId: team.Id,
|
||||
@@ -108,7 +108,7 @@ func TestGroupMsgProvider(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("Check without permission to post to an existing GM channel.", func(t *testing.T) {
|
||||
resp := cmd.DoCommand(th.App, &model.CommandArgs{
|
||||
resp := cmd.DoCommand(th.App, th.Context, &model.CommandArgs{
|
||||
T: i18n.IdentityTfunc(),
|
||||
SiteURL: "http://test.url",
|
||||
TeamId: team.Id,
|
||||
|
||||
Ссылка в новой задаче
Block a user