mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
make writing main test easier (#27270)
This PR removed `unittest.MainTest` the second parameter `TestOptions.GiteaRoot`. Now it detects the root directory by current working directory. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
package issues_test
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
issues_model "code.gitea.io/gitea/models/issues"
|
||||
@ -30,7 +29,5 @@ func TestFixturesAreConsistent(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
unittest.MainTest(m, &unittest.TestOptions{
|
||||
GiteaRootPath: filepath.Join("..", ".."),
|
||||
})
|
||||
unittest.MainTest(m)
|
||||
}
|
||||
|
Reference in New Issue
Block a user