mirror of
1
Fork 0

test: use memory for integration and journal for migration

This commit is contained in:
Michael Kriese 2024-11-14 15:37:50 +01:00
parent 24028747d3
commit aea3c7d6e8
No known key found for this signature in database
GPG Key ID: F8D7748549A5986A
2 changed files with 5 additions and 1 deletions

View File

@ -4,7 +4,8 @@ RUN_MODE = prod
[database]
DB_TYPE = sqlite3
PATH = :memory:
PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/gitea.db
SQLITE_JOURNAL_MODE = MEMORY
[indexer]
REPO_INDEXER_ENABLED = true

View File

@ -175,6 +175,9 @@ func InitTest(requireGitea bool) {
log.Fatal("db.Exec: CREATE SCHEMA: %v", err)
}
}
case setting.Database.Type.IsSQLite3():
setting.Database.Path = ":memory:"
}
routers.InitWebInstalled(graceful.GetManager().HammerContext())