summaryrefslogtreecommitdiffstats
path: root/tests/test_utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_utils.go')
-rw-r--r--tests/test_utils.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/test_utils.go b/tests/test_utils.go
index de022fde0a..6f0fb25560 100644
--- a/tests/test_utils.go
+++ b/tests/test_utils.go
@@ -36,6 +36,8 @@ func exitf(format string, args ...interface{}) {
}
func InitTest(requireGitea bool) {
+ log.RegisterEventWriter("test", testlogger.NewTestLoggerWriter)
+
giteaRoot := base.SetupGiteaRoot()
if giteaRoot == "" {
exitf("Environment variable $GITEA_ROOT not set")
@@ -246,7 +248,3 @@ func PrintCurrentTest(t testing.TB, skip ...int) func() {
func Printf(format string, args ...interface{}) {
testlogger.Printf(format, args...)
}
-
-func init() {
- log.Register("test", testlogger.NewTestLogger)
-}