aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2025-01-08 23:15:47 -0800
committerGitHub <noreply@github.com>2025-01-09 15:15:47 +0800
commitba5e3a5161a497aa8c73827774870fb94676e68b (patch)
treeb4da4e89fc88da1a11e4e75ddca7f1c69af9cc68
parent2a02734f93c0091275c77e370b7eed03b2c5f18e (diff)
downloadgitea-ba5e3a5161a497aa8c73827774870fb94676e68b.tar.gz
gitea-ba5e3a5161a497aa8c73827774870fb94676e68b.zip
Fix fuzz test (#33156)
-rw-r--r--tests/fuzz/fuzz_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/fuzz/fuzz_test.go b/tests/fuzz/fuzz_test.go
index 01d562d995..e7b832412a 100644
--- a/tests/fuzz/fuzz_test.go
+++ b/tests/fuzz/fuzz_test.go
@@ -19,6 +19,7 @@ func newFuzzRenderContext() *markup.RenderContext {
func FuzzMarkdownRenderRaw(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
+ setting.IsInTesting = true
setting.AppURL = "http://localhost:3000/"
markdown.RenderRaw(newFuzzRenderContext(), bytes.NewReader(data), io.Discard)
})
@@ -26,6 +27,7 @@ func FuzzMarkdownRenderRaw(f *testing.F) {
func FuzzMarkupPostProcess(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
+ setting.IsInTesting = true
setting.AppURL = "http://localhost:3000/"
markup.PostProcessDefault(newFuzzRenderContext(), bytes.NewReader(data), io.Discard)
})