aboutsummaryrefslogtreecommitdiffstats
path: root/models/asymkey/main_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-04-14 21:58:21 +0800
committerGitHub <noreply@github.com>2022-04-14 21:58:21 +0800
commitb8911fb45673fdc3fce587892c4d9215e7c15019 (patch)
treedf72d047049f53cdbe9cb5d16a03b814f29e9ca6 /models/asymkey/main_test.go
parent4dabc212c70d0cb0874d3af61d1ea24abd468f7e (diff)
downloadgitea-b8911fb45673fdc3fce587892c4d9215e7c15019.tar.gz
gitea-b8911fb45673fdc3fce587892c4d9215e7c15019.zip
Use a struct as test options (#19393)
* Use a struct as test options * Fix name * Fix test
Diffstat (limited to 'models/asymkey/main_test.go')
-rw-r--r--models/asymkey/main_test.go19
1 files changed, 11 insertions, 8 deletions
diff --git a/models/asymkey/main_test.go b/models/asymkey/main_test.go
index 1c4f7752e2..9f53e335fe 100644
--- a/models/asymkey/main_test.go
+++ b/models/asymkey/main_test.go
@@ -18,12 +18,15 @@ func init() {
}
func TestMain(m *testing.M) {
- unittest.MainTest(m, filepath.Join("..", ".."),
- "gpg_key.yml",
- "public_key.yml",
- "deploy_key.yml",
- "gpg_key_import.yml",
- "user.yml",
- "email_address.yml",
- )
+ unittest.MainTest(m, &unittest.TestOptions{
+ GiteaRootPath: filepath.Join("..", ".."),
+ FixtureFiles: []string{
+ "gpg_key.yml",
+ "public_key.yml",
+ "deploy_key.yml",
+ "gpg_key_import.yml",
+ "user.yml",
+ "email_address.yml",
+ },
+ })
}