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
@@ -23,7 +23,7 @@ func (tw testWriter) Write(p []byte) (int, error) {
|
||||
}
|
||||
|
||||
func TestExportPermissions(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
var scheme *model.Scheme
|
||||
@@ -91,7 +91,7 @@ func TestExportPermissions(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestImportPermissions(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
name := model.NewId()
|
||||
@@ -171,7 +171,7 @@ func TestImportPermissions(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestImportPermissions_idempotentScheme(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
name := model.NewId()
|
||||
@@ -214,7 +214,7 @@ func TestImportPermissions_idempotentScheme(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestImportPermissions_schemeDeletedOnRoleFailure(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
name := model.NewId()
|
||||
|
||||
Ссылка в новой задаче
Block a user