test: use memory for integration and journal for migration
This commit is contained in:
parent
24028747d3
commit
aea3c7d6e8
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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