Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-22 01:44:24 +01:00

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())