diff options
Diffstat (limited to 'cmd/main_test.go')
-rw-r--r-- | cmd/main_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cmd/main_test.go b/cmd/main_test.go new file mode 100644 index 0000000000..9cce0ef036 --- /dev/null +++ b/cmd/main_test.go @@ -0,0 +1,23 @@ +// Copyright 2022 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package cmd + +import ( + "testing" + + "code.gitea.io/gitea/models/unittest" + "code.gitea.io/gitea/modules/setting" +) + +func init() { + setting.SetCustomPathAndConf("", "", "") + setting.LoadForTest() +} + +func TestMain(m *testing.M) { + unittest.MainTest(m, &unittest.TestOptions{ + GiteaRootPath: "..", + }) +} |