您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

main_test.go 589B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2021 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package asymkey
  4. import (
  5. "path/filepath"
  6. "testing"
  7. "code.gitea.io/gitea/models/unittest"
  8. "code.gitea.io/gitea/modules/setting"
  9. )
  10. func init() {
  11. setting.SetCustomPathAndConf("", "", "")
  12. setting.LoadForTest()
  13. }
  14. func TestMain(m *testing.M) {
  15. unittest.MainTest(m, &unittest.TestOptions{
  16. GiteaRootPath: filepath.Join("..", ".."),
  17. FixtureFiles: []string{
  18. "gpg_key.yml",
  19. "public_key.yml",
  20. "deploy_key.yml",
  21. "gpg_key_import.yml",
  22. "user.yml",
  23. "email_address.yml",
  24. },
  25. })
  26. }