From 673cf6af763fe7fd4301382f7b059b0799fca396 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 28 Sep 2023 09:38:53 +0800 Subject: 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 --- routers/web/org/main_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'routers/web/org') diff --git a/routers/web/org/main_test.go b/routers/web/org/main_test.go index 41323a3601..92237d6e88 100644 --- a/routers/web/org/main_test.go +++ b/routers/web/org/main_test.go @@ -4,14 +4,11 @@ package org_test import ( - "path/filepath" "testing" "code.gitea.io/gitea/models/unittest" ) func TestMain(m *testing.M) { - unittest.MainTest(m, &unittest.TestOptions{ - GiteaRootPath: filepath.Join("..", "..", ".."), - }) + unittest.MainTest(m) } -- cgit v1.2.3