aboutsummaryrefslogtreecommitdiffstats
path: root/models/main_test.go
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-11-30 07:52:15 -0800
committerLauris BH <lauris@nix.lv>2017-11-30 17:52:15 +0200
commit91f3d77ceb66bedc7bb4d792306beb547f104dce (patch)
treeb081210cb7b6b26415e0e28ceb3a51477407a97e /models/main_test.go
parent82e8486f13253e5a2b1a06c286b1e2b2b6049473 (diff)
downloadgitea-91f3d77ceb66bedc7bb4d792306beb547f104dce.tar.gz
gitea-91f3d77ceb66bedc7bb4d792306beb547f104dce.zip
Unit tests for wiki routers (#3022)
Diffstat (limited to 'models/main_test.go')
-rw-r--r--models/main_test.go20
1 files changed, 1 insertions, 19 deletions
diff --git a/models/main_test.go b/models/main_test.go
index 451b5e4b21..11c175ef88 100644
--- a/models/main_test.go
+++ b/models/main_test.go
@@ -1,14 +1,8 @@
package models
import (
- "fmt"
- "os"
- "path/filepath"
"testing"
- "code.gitea.io/gitea/modules/setting"
-
- _ "github.com/mattn/go-sqlite3" // for the test engine
"github.com/stretchr/testify/assert"
)
@@ -19,17 +13,5 @@ func TestFixturesAreConsistent(t *testing.T) {
}
func TestMain(m *testing.M) {
- if err := CreateTestEngine("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())
+ MainTest(m, "..")
}