Passing t to all tests setup functions (#13841)
* Passing t to all tests setup functions * Fixing build
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3b732fe257
Коммит
1d1ab03c38
@@ -36,13 +36,13 @@ type testHelper struct {
|
||||
}
|
||||
|
||||
// Setup creates an instance of testHelper.
|
||||
func Setup() *testHelper {
|
||||
func Setup(t testing.TB) *testHelper {
|
||||
dir, err := ioutil.TempDir("", "testHelper")
|
||||
if err != nil {
|
||||
panic("failed to create temporary directory: " + err.Error())
|
||||
}
|
||||
|
||||
api4TestHelper := api4.Setup()
|
||||
api4TestHelper := api4.Setup(t)
|
||||
|
||||
testHelper := &testHelper{
|
||||
TestHelper: api4TestHelper,
|
||||
|
||||
Ссылка в новой задаче
Block a user