MM-26750: Remove instances of InitBasic when it's not required (#14984)
th.InitBasic initializes users, channels, and teams. But a lot of tests don't use it at all, causing unncessary delays. A single InitBasic call takes around 400ms. This PR removes 71 of them, approximately shaving off 28 seconds. Arguably, this would be more because some tests run in loops.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
da95d40e33
Коммит
94827d06a3
@@ -155,7 +155,7 @@ func TestCopyEmojiImages(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestExportCustomEmoji(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
filePath := "../demo.json"
|
||||
@@ -173,7 +173,7 @@ func TestExportCustomEmoji(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestExportAllUsers(t *testing.T) {
|
||||
th1 := Setup(t).InitBasic()
|
||||
th1 := Setup(t)
|
||||
defer th1.TearDown()
|
||||
|
||||
// Adding a user and deactivating it to check whether it gets included in bulk export
|
||||
|
||||
Ссылка в новой задаче
Block a user