aboutsummaryrefslogtreecommitdiffstats
path: root/models/system
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-09-28 09:38:53 +0800
committerGitHub <noreply@github.com>2023-09-28 01:38:53 +0000
commit673cf6af763fe7fd4301382f7b059b0799fca396 (patch)
treee9d0ed0f9d6af5dd03841c3126c9c8c0544b1277 /models/system
parente74a3b18afdbe9bbf56b8f845c915c13894d15c3 (diff)
downloadgitea-673cf6af763fe7fd4301382f7b059b0799fca396.tar.gz
gitea-673cf6af763fe7fd4301382f7b059b0799fca396.zip
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>
Diffstat (limited to 'models/system')
-rw-r--r--models/system/main_test.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/models/system/main_test.go b/models/system/main_test.go
index e074abc155..6bc27a7cff 100644
--- a/models/system/main_test.go
+++ b/models/system/main_test.go
@@ -4,7 +4,6 @@
package system_test
import (
- "path/filepath"
"testing"
"code.gitea.io/gitea/models/unittest"
@@ -16,7 +15,5 @@ import (
)
func TestMain(m *testing.M) {
- unittest.MainTest(m, &unittest.TestOptions{
- GiteaRootPath: filepath.Join("..", ".."),
- })
+ unittest.MainTest(m)
}