Use a struct as test options (#19393)

* Use a struct as test options

* Fix name

* Fix test
This commit is contained in:
Lunny Xiao 2022-04-14 21:58:21 +08:00 committed by GitHub
parent 4dabc212c7
commit b8911fb456
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 210 additions and 100 deletions

View file

@ -12,5 +12,7 @@ import (
)
func TestMain(m *testing.M) {
unittest.MainTest(m, filepath.Join("..", "..", "..", ".."))
unittest.MainTest(m, &unittest.TestOptions{
GiteaRootPath: filepath.Join("..", "..", "..", ".."),
})
}

View file

@ -12,5 +12,7 @@ import (
)
func TestMain(m *testing.M) {
unittest.MainTest(m, filepath.Join("..", "..", ".."))
unittest.MainTest(m, &unittest.TestOptions{
GiteaRootPath: filepath.Join("..", "..", ".."),
})
}

View file

@ -12,5 +12,7 @@ import (
)
func TestMain(m *testing.M) {
unittest.MainTest(m, filepath.Join("..", "..", ".."))
unittest.MainTest(m, &unittest.TestOptions{
GiteaRootPath: filepath.Join("..", "..", ".."),
})
}

View file

@ -12,5 +12,7 @@ import (
)
func TestMain(m *testing.M) {
unittest.MainTest(m, filepath.Join("..", "..", ".."))
unittest.MainTest(m, &unittest.TestOptions{
GiteaRootPath: filepath.Join("..", "..", ".."),
})
}

View file

@ -12,5 +12,7 @@ import (
)
func TestMain(m *testing.M) {
unittest.MainTest(m, filepath.Join("..", "..", ".."))
unittest.MainTest(m, &unittest.TestOptions{
GiteaRootPath: filepath.Join("..", "..", ".."),
})
}

View file

@ -12,5 +12,7 @@ import (
)
func TestMain(m *testing.M) {
unittest.MainTest(m, filepath.Join("..", "..", "..", ".."))
unittest.MainTest(m, &unittest.TestOptions{
GiteaRootPath: filepath.Join("..", "..", "..", ".."),
})
}