aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/markdown/markdown_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markup/markdown/markdown_test.go')
-rw-r--r--modules/markup/markdown/markdown_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/markup/markdown/markdown_test.go b/modules/markup/markdown/markdown_test.go
index a069d402bb..732fe1a6be 100644
--- a/modules/markup/markdown/markdown_test.go
+++ b/modules/markup/markdown/markdown_test.go
@@ -5,6 +5,7 @@
package markdown_test
import (
+ "context"
"strings"
"testing"
@@ -31,6 +32,13 @@ var localMetas = map[string]string{
"repoPath": "../../../integrations/gitea-repositories-meta/user13/repo11.git/",
}
+func TestMain(m *testing.M) {
+ setting.LoadAllowEmpty()
+ if err := git.InitSimple(context.Background()); err != nil {
+ log.Fatal("git init failed, err: %v", err)
+ }
+}
+
func TestRender_StandardLinks(t *testing.T) {
setting.AppURL = AppURL
setting.AppSubURL = AppSubURL