Don't modify global variables in TestNoticeValidation (#27591)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
00dc08824c
Коммит
6fc5ff572f
@@ -566,18 +566,17 @@ func TestNoticeValidation(t *testing.T) {
|
||||
clientVersion = "1.2.3"
|
||||
}
|
||||
|
||||
model.CurrentVersion = tt.args.serverVersion
|
||||
if model.CurrentVersion == "" {
|
||||
model.CurrentVersion = "5.26.1"
|
||||
defer func() {
|
||||
model.CurrentVersion = ""
|
||||
}()
|
||||
serverVersion := tt.args.serverVersion
|
||||
if serverVersion == "" {
|
||||
serverVersion = "5.26.1"
|
||||
}
|
||||
|
||||
if ok, err := noticeMatchesConditions(
|
||||
th.App.Config(),
|
||||
th.App.Srv().Store().Preference(),
|
||||
"test",
|
||||
tt.args.client,
|
||||
serverVersion,
|
||||
clientVersion,
|
||||
tt.args.postCount,
|
||||
tt.args.userCount,
|
||||
|
||||
Ссылка в новой задаче
Block a user