diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-09-28 03:38:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-28 03:38:53 +0200 |
commit | 673cf6af763fe7fd4301382f7b059b0799fca396 (patch) | |
tree | e9d0ed0f9d6af5dd03841c3126c9c8c0544b1277 /models/packages | |
parent | [skip ci] Updated translations via Crowdin (diff) | |
download | forgejo-673cf6af763fe7fd4301382f7b059b0799fca396.tar.xz forgejo-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/packages')
-rw-r--r-- | models/packages/package_test.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/models/packages/package_test.go b/models/packages/package_test.go index 525a9f08d6..7f03151e77 100644 --- a/models/packages/package_test.go +++ b/models/packages/package_test.go @@ -4,7 +4,6 @@ package packages_test import ( - "path/filepath" "testing" "code.gitea.io/gitea/models/db" @@ -20,9 +19,7 @@ import ( ) func TestMain(m *testing.M) { - unittest.MainTest(m, &unittest.TestOptions{ - GiteaRootPath: filepath.Join("..", ".."), - }) + unittest.MainTest(m) } func TestHasOwnerPackages(t *testing.T) { |