Skip to content

Commit 39e12ba

Browse files
committed
init gitea-repositories-meta
1 parent f2e0536 commit 39e12ba

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

integrations/migration-test/migration_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"io/ioutil"
1313
"os"
1414
"path"
15+
"path/filepath"
1516
"regexp"
1617
"sort"
1718
"strings"
@@ -25,6 +26,7 @@ import (
2526
"code.gitea.io/gitea/modules/setting"
2627

2728
"github.com/stretchr/testify/assert"
29+
"github.com/unknwon/com"
2830
"xorm.io/xorm"
2931
)
3032

@@ -54,6 +56,11 @@ func initMigrationTest(t *testing.T) func() {
5456
}
5557

5658
setting.NewContext()
59+
60+
assert.True(t, len(setting.RepoRootPath) != 0)
61+
assert.NoError(t, os.RemoveAll(setting.RepoRootPath))
62+
assert.NoError(t, com.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath))
63+
5764
setting.CheckLFSVersion()
5865
setting.InitDBConfig()
5966
setting.NewLogServices(true)

0 commit comments

Comments
 (0)