diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-05-20 04:48:22 -0400 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-05-20 16:48:22 +0800 |
commit | cf02cd7ba0c94165743660cf30f0cbb5a73a385e (patch) | |
tree | 6f09dce7c705041df1e042750137e379b0af66dc /models/main_test.go | |
parent | 85a73965256411c36ecc050eeb7967d3c8ef20d5 (diff) | |
download | gitea-cf02cd7ba0c94165743660cf30f0cbb5a73a385e.tar.gz gitea-cf02cd7ba0c94165743660cf30f0cbb5a73a385e.zip |
Fix and test for delete user (#1713)
* Fix and test for delete user
* Run updates in batches
* Unit test
Diffstat (limited to 'models/main_test.go')
-rw-r--r-- | models/main_test.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/models/main_test.go b/models/main_test.go new file mode 100644 index 0000000000..304bbccaa9 --- /dev/null +++ b/models/main_test.go @@ -0,0 +1,26 @@ +package models + +import ( + "fmt" + "os" + "path/filepath" + "testing" + + "code.gitea.io/gitea/modules/setting" +) + +func TestMain(m *testing.M) { + if err := CreateTestEngine(); 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()) +} |