Passing t to all tests setup functions (#13841)

* Passing t to all tests setup functions

* Fixing build
Этот коммит содержится в:
Jesús Espino
2020-02-10 19:31:41 +01:00
коммит произвёл GitHub
родитель 3b732fe257
Коммит 1d1ab03c38
73 изменённых файлов: 646 добавлений и 632 удалений

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

@@ -39,7 +39,7 @@ type TestHelper struct {
tempWorkspace string
}
func Setup() *TestHelper {
func Setup(tb testing.TB) *TestHelper {
store := mainHelper.GetStore()
store.DropAllTables()
@@ -130,7 +130,7 @@ func (th *TestHelper) TearDown() {
}
func TestStaticFilesRequest(t *testing.T) {
th := Setup().InitPlugins()
th := Setup(t).InitPlugins()
defer th.TearDown()
pluginID := "com.mattermost.sample"
@@ -216,7 +216,7 @@ func TestStaticFilesRequest(t *testing.T) {
}
func TestPublicFilesRequest(t *testing.T) {
th := Setup().InitPlugins()
th := Setup(t).InitPlugins()
defer th.TearDown()
pluginDir, err := ioutil.TempDir("", "")