summaryrefslogtreecommitdiffstats
path: root/integrations/migration-test
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-04-14 15:53:34 +0200
committerGitHub <noreply@github.com>2020-04-14 09:53:34 -0400
commit10e2f291442fdc7efc31c02f5ffcba79a36db9ac (patch)
tree5dbda60a983caf8d83ad7202755587acd692c212 /integrations/migration-test
parentc571c5bb286b925297f4eb32d130a5496126c3cb (diff)
downloadgitea-10e2f291442fdc7efc31c02f5ffcba79a36db9ac.tar.gz
gitea-10e2f291442fdc7efc31c02f5ffcba79a36db9ac.zip
Cache PullRequest Divergence (#10914)
* Cache PullRequest Divergence * only re-calc divergence if AddTestPullRequestTask() is exec * migrate already open pulls * finalize * take care of closed&not-merged+deleted-branch pull requests * fix nil pointer exeption Signed-off-by: 6543 <6543@obermui.de> * try this * no error its a warn * init gitea-repositories-meta * dont use gitDivergence type * CI.restart() * CI.restart() * CI.restart() * CI.restart() * check IsUserAllowedToUpdate independend from CommitsBehind
Diffstat (limited to 'integrations/migration-test')
-rw-r--r--integrations/migration-test/migration_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/integrations/migration-test/migration_test.go b/integrations/migration-test/migration_test.go
index a4d01efef3..4ee045db38 100644
--- a/integrations/migration-test/migration_test.go
+++ b/integrations/migration-test/migration_test.go
@@ -12,6 +12,7 @@ import (
"io/ioutil"
"os"
"path"
+ "path/filepath"
"regexp"
"sort"
"strings"
@@ -25,6 +26,7 @@ import (
"code.gitea.io/gitea/modules/setting"
"github.com/stretchr/testify/assert"
+ "github.com/unknwon/com"
"xorm.io/xorm"
)
@@ -54,6 +56,11 @@ func initMigrationTest(t *testing.T) func() {
}
setting.NewContext()
+
+ assert.True(t, len(setting.RepoRootPath) != 0)
+ assert.NoError(t, os.RemoveAll(setting.RepoRootPath))
+ assert.NoError(t, com.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath))
+
setting.CheckLFSVersion()
setting.InitDBConfig()
setting.NewLogServices(true)