aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/migrations/migrations_test.go4
-rw-r--r--models/migrations/testlogger_test.go2
-rw-r--r--models/unittest/testdb.go4
3 files changed, 5 insertions, 5 deletions
diff --git a/models/migrations/migrations_test.go b/models/migrations/migrations_test.go
index 53e4f35395..5cd70626b4 100644
--- a/models/migrations/migrations_test.go
+++ b/models/migrations/migrations_test.go
@@ -46,7 +46,7 @@ func TestMain(m *testing.M) {
giteaConf := os.Getenv("GITEA_CONF")
if giteaConf == "" {
- giteaConf = path.Join(filepath.Dir(setting.AppPath), "integrations/sqlite.ini")
+ giteaConf = path.Join(filepath.Dir(setting.AppPath), "tests/sqlite.ini")
fmt.Printf("Environment variable $GITEA_CONF not set - defaulting to %s\n", giteaConf)
}
@@ -205,7 +205,7 @@ func prepareTestEnv(t *testing.T, skip int, syncModels ...interface{}) (*xorm.En
ourSkip += skip
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, unittest.CopyDir(path.Join(filepath.Dir(setting.AppPath), "tests/gitea-repositories-meta"), setting.RepoRootPath))
ownerDirs, err := os.ReadDir(setting.RepoRootPath)
if err != nil {
assert.NoError(t, err, "unable to read the new repo root: %v\n", err)
diff --git a/models/migrations/testlogger_test.go b/models/migrations/testlogger_test.go
index adbf19c0db..0455d9c9a6 100644
--- a/models/migrations/testlogger_test.go
+++ b/models/migrations/testlogger_test.go
@@ -188,5 +188,5 @@ func (log *TestLogger) GetName() string {
func init() {
log.Register("test", NewTestLogger)
_, filename, _, _ := runtime.Caller(0)
- prefix = strings.TrimSuffix(filename, "integrations/testlogger.go")
+ prefix = strings.TrimSuffix(filename, "tests/testlogger.go")
}
diff --git a/models/unittest/testdb.go b/models/unittest/testdb.go
index 58656f781f..25129137f7 100644
--- a/models/unittest/testdb.go
+++ b/models/unittest/testdb.go
@@ -116,7 +116,7 @@ func MainTest(m *testing.M, testOpts *TestOptions) {
if err = util.RemoveAll(repoRootPath); err != nil {
fatalTestError("util.RemoveAll: %v\n", err)
}
- if err = CopyDir(filepath.Join(testOpts.GiteaRootPath, "integrations", "gitea-repositories-meta"), setting.RepoRootPath); err != nil {
+ if err = CopyDir(filepath.Join(testOpts.GiteaRootPath, "tests", "gitea-repositories-meta"), setting.RepoRootPath); err != nil {
fatalTestError("util.CopyDir: %v\n", err)
}
@@ -202,7 +202,7 @@ func PrepareTestDatabase() error {
func PrepareTestEnv(t testing.TB) {
assert.NoError(t, PrepareTestDatabase())
assert.NoError(t, util.RemoveAll(setting.RepoRootPath))
- metaPath := filepath.Join(giteaRoot, "integrations", "gitea-repositories-meta")
+ metaPath := filepath.Join(giteaRoot, "tests", "gitea-repositories-meta")
assert.NoError(t, CopyDir(metaPath, setting.RepoRootPath))
ownerDirs, err := os.ReadDir(setting.RepoRootPath)
assert.NoError(t, err)