MM-21898 - Part 1: Generate and use an interface instead of *A… (#13840)

* Generate and use an interface instead of *App
Этот коммит содержится в:
Eli Yukelzon
2020-02-13 13:26:58 +01:00
коммит произвёл GitHub
родитель 66fc096768
Коммит 17523fa5d9
200 изменённых файлов: 4553 добавлений и 2361 удалений

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

@@ -60,7 +60,7 @@ func BenchmarkUploadFile(b *testing.B) {
th := Setup(b).InitBasic()
defer th.TearDown()
// disable logging in the benchmark, as best we can
th.App.Log.SetConsoleLevel(mlog.LevelError)
th.App.Log().SetConsoleLevel(mlog.LevelError)
teamId := model.NewId()
channelId := model.NewId()
userId := model.NewId()
@@ -91,7 +91,7 @@ func BenchmarkUploadFile(b *testing.B) {
if err != nil {
b.Fatal(err)
}
th.App.Srv.Store.FileInfo().PermanentDelete(info1.Id)
th.App.Srv().Store.FileInfo().PermanentDelete(info1.Id)
th.App.RemoveFile(info1.Path)
},
@@ -110,7 +110,7 @@ func BenchmarkUploadFile(b *testing.B) {
if aerr != nil {
b.Fatal(aerr)
}
th.App.Srv.Store.FileInfo().PermanentDelete(info.Id)
th.App.Srv().Store.FileInfo().PermanentDelete(info.Id)
th.App.RemoveFile(info.Path)
},
},
@@ -128,7 +128,7 @@ func BenchmarkUploadFile(b *testing.B) {
if aerr != nil {
b.Fatal(aerr)
}
th.App.Srv.Store.FileInfo().PermanentDelete(info.Id)
th.App.Srv().Store.FileInfo().PermanentDelete(info.Id)
th.App.RemoveFile(info.Path)
},
},
@@ -143,7 +143,7 @@ func BenchmarkUploadFile(b *testing.B) {
if err != nil {
b.Fatal(err)
}
th.App.Srv.Store.FileInfo().PermanentDelete(resp.FileInfos[0].Id)
th.App.Srv().Store.FileInfo().PermanentDelete(resp.FileInfos[0].Id)
th.App.RemoveFile(resp.FileInfos[0].Path)
},
},
@@ -160,7 +160,7 @@ func BenchmarkUploadFile(b *testing.B) {
if aerr != nil {
b.Fatal(aerr)
}
th.App.Srv.Store.FileInfo().PermanentDelete(info.Id)
th.App.Srv().Store.FileInfo().PermanentDelete(info.Id)
th.App.RemoveFile(info.Path)
},
},
@@ -177,7 +177,7 @@ func BenchmarkUploadFile(b *testing.B) {
if aerr != nil {
b.Fatal(aerr)
}
th.App.Srv.Store.FileInfo().PermanentDelete(info.Id)
th.App.Srv().Store.FileInfo().PermanentDelete(info.Id)
th.App.RemoveFile(info.Path)
},
},