summaryrefslogtreecommitdiffstats
path: root/models/setup_for_test.go
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2017-01-28 11:27:45 -0200
committerGitHub <noreply@github.com>2017-01-28 11:27:45 -0200
commit31c717f57957902081e64e9db3211216bf61f45b (patch)
treebaedbf658a6bcc1aadb962d4b5c61694f1369109 /models/setup_for_test.go
parentabf3fbf0b1f682628c941b21cbae55a5df5bad83 (diff)
parentbb76285762186c7ca2add7c199114786a3b2e207 (diff)
downloadgitea-31c717f57957902081e64e9db3211216bf61f45b.tar.gz
gitea-31c717f57957902081e64e9db3211216bf61f45b.zip
Merge pull request #777 from ethantkoenig/tests/wiki
Unit tests for models/wiki
Diffstat (limited to 'models/setup_for_test.go')
-rw-r--r--models/setup_for_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/models/setup_for_test.go b/models/setup_for_test.go
index aec409622b..0073e93456 100644
--- a/models/setup_for_test.go
+++ b/models/setup_for_test.go
@@ -9,6 +9,8 @@ import (
"os"
"testing"
+ "code.gitea.io/gitea/modules/setting"
+
"github.com/go-xorm/core"
"github.com/go-xorm/xorm"
_ "github.com/mattn/go-sqlite3" // for the test engine
@@ -23,6 +25,14 @@ func TestMain(m *testing.M) {
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 = "/repos"
+ setting.AppDataPath = "/appdata"
+
os.Exit(m.Run())
}