aboutsummaryrefslogtreecommitdiffstats
path: root/routers/user/main_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/main_test.go')
-rw-r--r--routers/user/main_test.go19
1 files changed, 1 insertions, 18 deletions
diff --git a/routers/user/main_test.go b/routers/user/main_test.go
index 83c0c65474..ed0724dc77 100644
--- a/routers/user/main_test.go
+++ b/routers/user/main_test.go
@@ -5,29 +5,12 @@
package user
import (
- "fmt"
- "os"
"path/filepath"
"testing"
"code.gitea.io/gitea/models"
- "code.gitea.io/gitea/modules/setting"
-
- _ "github.com/mattn/go-sqlite3" // for the test engine
)
func TestMain(m *testing.M) {
- if err := models.CreateTestEngine("../../models/fixtures/"); err != nil {
- fmt.Printf("Error creating test engine: %v\n", err)
- os.Exit(1)
- }
-
- setting.AppURL = "https://try.gitea.io/"
- setting.RunUser = "runuser"
- setting.SSH.Port = 3000
- setting.SSH.Domain = "try.gitea.io"
- setting.RepoRootPath = filepath.Join(os.TempDir(), "repos")
- setting.AppDataPath = filepath.Join(os.TempDir(), "appdata")
-
- os.Exit(m.Run())
+ models.MainTest(m, filepath.Join("..", ".."))
}