mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 14:53:34 +01:00
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]
|
[database]
|
||||||
DB_TYPE = sqlite3
|
DB_TYPE = sqlite3
|
||||||
PATH = :memory:
|
PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/gitea.db
|
||||||
|
SQLITE_JOURNAL_MODE = MEMORY
|
||||||
|
|
||||||
[indexer]
|
[indexer]
|
||||||
REPO_INDEXER_ENABLED = true
|
REPO_INDEXER_ENABLED = true
|
||||||
|
|
|
@ -175,6 +175,9 @@ func InitTest(requireGitea bool) {
|
||||||
log.Fatal("db.Exec: CREATE SCHEMA: %v", err)
|
log.Fatal("db.Exec: CREATE SCHEMA: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case setting.Database.Type.IsSQLite3():
|
||||||
|
setting.Database.Path = ":memory:"
|
||||||
}
|
}
|
||||||
|
|
||||||
routers.InitWebInstalled(graceful.GetManager().HammerContext())
|
routers.InitWebInstalled(graceful.GetManager().HammerContext())
|
||||||
|
|
Loading…
Reference in a new issue