mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-28 09:21:13 -05:00
Merge pull request 'test: use sqlite in-memory db for integration' (#5956) from viceice/test/integration/use-sqlite-in-memory-db into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5956 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: Otto <otto@codeberg.org>
This commit is contained in:
commit
91fda7ee81
2 changed files with 4 additions and 0 deletions
|
@ -5,6 +5,7 @@ RUN_MODE = prod
|
|||
[database]
|
||||
DB_TYPE = sqlite3
|
||||
PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/gitea.db
|
||||
SQLITE_JOURNAL_MODE = MEMORY
|
||||
|
||||
[indexer]
|
||||
REPO_INDEXER_ENABLED = true
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue