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 --- services/repository/archiver/archiver_test.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'services/repository/archiver') diff --git a/services/repository/archiver/archiver_test.go b/services/repository/archiver/archiver_test.go index a1bc355d4e..ff8bb8ca7a 100644 --- a/services/repository/archiver/archiver_test.go +++ b/services/repository/archiver/archiver_test.go @@ -5,7 +5,6 @@ package archiver import ( "errors" - "path/filepath" "testing" "time" @@ -18,9 +17,7 @@ import ( ) func TestMain(m *testing.M) { - unittest.MainTest(m, &unittest.TestOptions{ - GiteaRootPath: filepath.Join("..", "..", ".."), - }) + unittest.MainTest(m) } func TestArchive_Basic(t *testing.T) { -- cgit v1.2.3