Fix and test for delete user (#1713)
* Fix and test for delete user * Run updates in batches * Unit test
This commit is contained in:
parent
85a7396525
commit
cf02cd7ba0
11 changed files with 161 additions and 69 deletions
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())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue