Passing t to all tests setup functions (#13841)
* Passing t to all tests setup functions * Fixing build
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3b732fe257
Коммит
1d1ab03c38
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
func TestCreateJob(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
job := &model.Job{
|
||||
@@ -39,7 +39,7 @@ func TestCreateJob(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetJob(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
job := &model.Job{
|
||||
@@ -68,7 +68,7 @@ func TestGetJob(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetJobs(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
jobType := model.NewId()
|
||||
@@ -115,7 +115,7 @@ func TestGetJobs(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGetJobsByType(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
jobType := model.NewId()
|
||||
@@ -173,7 +173,7 @@ func TestGetJobsByType(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCancelJob(t *testing.T) {
|
||||
th := Setup().InitBasic()
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
jobs := []*model.Job{
|
||||
|
||||
Ссылка в новой задаче
Block a user