mirror of
https://github.com/go-gitea/gitea
synced 2025-07-07 19:17:21 +00:00
Fix and test for delete user (#1713)
* Fix and test for delete user * Run updates in batches * Unit test
This commit is contained in:
26
models/main_test.go
Normal file
26
models/main_test.go
Normal file
@ -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())
|
||||
}
|
Reference in New Issue
Block a user