aboutsummaryrefslogtreecommitdiffstats
path: root/models/migrations/migrations_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/migrations/migrations_test.go')
-rw-r--r--models/migrations/migrations_test.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/models/migrations/migrations_test.go b/models/migrations/migrations_test.go
index 46782f24a1..53e4f35395 100644
--- a/models/migrations/migrations_test.go
+++ b/models/migrations/migrations_test.go
@@ -66,11 +66,10 @@ func TestMain(m *testing.M) {
setting.SetCustomPathAndConf("", "", "")
setting.LoadForTest()
- if err = git.InitOnceWithSync(context.Background()); err != nil {
- fmt.Printf("Unable to InitOnceWithSync: %v\n", err)
+ if err = git.InitFull(context.Background()); err != nil {
+ fmt.Printf("Unable to InitFull: %v\n", err)
os.Exit(1)
}
- git.CheckLFSVersion()
setting.InitDBConfig()
setting.NewLogServices(true)
@@ -207,7 +206,6 @@ func prepareTestEnv(t *testing.T, skip int, syncModels ...interface{}) (*xorm.En
deferFn := PrintCurrentTest(t, ourSkip)
assert.NoError(t, os.RemoveAll(setting.RepoRootPath))
assert.NoError(t, unittest.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath))
- assert.NoError(t, git.InitOnceWithSync(context.Background())) // the gitconfig has been removed above, so sync the gitconfig again
ownerDirs, err := os.ReadDir(setting.RepoRootPath)
if err != nil {
assert.NoError(t, err, "unable to read the new repo root: %v\n", err)