[GH-25494] add request context to public methods in bot go (#26408)

Этот коммит содержится в:
Ezekiel
2024-03-11 20:24:35 +08:00
коммит произвёл GitHub
родитель bca5ab9a1f
Коммит 1c846d8341
18 изменённых файлов: 215 добавлений и 215 удалений

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

@@ -353,7 +353,7 @@ func TestUpdateActiveBotsSideEffect(t *testing.T) {
OwnerId: th.BasicUser.Id,
})
require.Nil(t, err)
defer th.App.PermanentDeleteBot(bot.UserId)
defer th.App.PermanentDeleteBot(th.Context, bot.UserId)
// Automatic deactivation disabled
th.App.UpdateConfig(func(cfg *model.Config) {
@@ -362,7 +362,7 @@ func TestUpdateActiveBotsSideEffect(t *testing.T) {
th.App.UpdateActive(th.Context, th.BasicUser, false)
retbot1, err := th.App.GetBot(bot.UserId, true)
retbot1, err := th.App.GetBot(th.Context, bot.UserId, true)
require.Nil(t, err)
require.Zero(t, retbot1.DeleteAt)
user1, err := th.App.GetUser(bot.UserId)
@@ -378,7 +378,7 @@ func TestUpdateActiveBotsSideEffect(t *testing.T) {
th.App.UpdateActive(th.Context, th.BasicUser, false)
retbot2, err := th.App.GetBot(bot.UserId, true)
retbot2, err := th.App.GetBot(th.Context, bot.UserId, true)
require.Nil(t, err)
require.NotZero(t, retbot2.DeleteAt)
user2, err := th.App.GetUser(bot.UserId)