MM-43137: Fix racy test TestUpdateActiveBotsSideEffect (#19935)
This was introduced with 2e027ae927.
We fix it by deep copying the user struct before returning from store.
https://mattermost.atlassian.net/browse/MM-43137
```release-note
NONE
```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
762caaeb51
Коммит
f93d6d5687
@@ -224,7 +224,7 @@ func (us SqlUserStore) Update(user *model.User, trustedUpdateData bool) (*model.
|
|||||||
|
|
||||||
user.Sanitize(map[string]bool{})
|
user.Sanitize(map[string]bool{})
|
||||||
oldUser.Sanitize(map[string]bool{})
|
oldUser.Sanitize(map[string]bool{})
|
||||||
return &model.UserUpdate{New: user, Old: &oldUser}, nil
|
return &model.UserUpdate{New: user.DeepCopy(), Old: &oldUser}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (us SqlUserStore) UpdateNotifyProps(userID string, props map[string]string) error {
|
func (us SqlUserStore) UpdateNotifyProps(userID string, props map[string]string) error {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user