mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-21 08:43:08 +00:00
Don't print SQL in unit tests (#2995)
* Add GITEA_UNIT_TESTS_VERBOSE environment variable to enable printing SQL
This commit is contained in:
parent
8b58772659
commit
1028ef2def
1 changed files with 4 additions and 1 deletions
|
@ -32,7 +32,10 @@ func CreateTestEngine(fixturesDir string) error {
|
|||
if err = x.StoreEngine("InnoDB").Sync2(tables...); err != nil {
|
||||
return err
|
||||
}
|
||||
x.ShowSQL(true)
|
||||
switch os.Getenv("GITEA_UNIT_TESTS_VERBOSE") {
|
||||
case "true", "1":
|
||||
x.ShowSQL(true)
|
||||
}
|
||||
|
||||
return InitFixtures(&testfixtures.SQLite{}, fixturesDir)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue