aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/content/doc/developers/hacking-on-gitea.en-us.md2
-rw-r--r--models/unittest/testdb.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/content/doc/developers/hacking-on-gitea.en-us.md b/docs/content/doc/developers/hacking-on-gitea.en-us.md
index a0a3725955..5f52856d1d 100644
--- a/docs/content/doc/developers/hacking-on-gitea.en-us.md
+++ b/docs/content/doc/developers/hacking-on-gitea.en-us.md
@@ -277,7 +277,7 @@ There are two types of test run by Gitea: Unit tests and Integration Tests.
### Unit Tests
Unit tests are covered by `*_test.go` in `go test` system.
-You can set environment variable `GITEA_UNIT_TESTS_VERBOSE=1` to see detail logs during the test.
+You can set the environment variable `GITEA_UNIT_TESTS_LOG_SQL=1` to display all SQL statements when running the tests in verbose mode (i.e. when `GOTESTFLAGS=-v` is set).
```bash
TAGS="bindata sqlite sqlite_unlock_notify" make test # Runs the unit tests
diff --git a/models/unittest/testdb.go b/models/unittest/testdb.go
index c798dbefb1..6f3a36ed21 100644
--- a/models/unittest/testdb.go
+++ b/models/unittest/testdb.go
@@ -152,7 +152,7 @@ func CreateTestEngine(opts FixturesOptions) error {
if err = db.SyncAllTables(); err != nil {
return err
}
- switch os.Getenv("GITEA_UNIT_TESTS_VERBOSE") {
+ switch os.Getenv("GITEA_UNIT_TESTS_LOG_SQL") {
case "true", "1":
x.ShowSQL(true)
}