aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2025-01-09 15:40:35 +0800
committerGitHub <noreply@github.com>2025-01-09 07:40:35 +0000
commit12c24c21894ecbe46977aca52ec3d07dc1289df0 (patch)
treed3eb998d54ac456094360a2f4bcf952e9fb3e248
parenta330f42f016e5a69dc204cdf858d8283ba75c229 (diff)
downloadgitea-12c24c21894ecbe46977aca52ec3d07dc1289df0.tar.gz
gitea-12c24c21894ecbe46977aca52ec3d07dc1289df0.zip
Fix fuzz test (#33156) (#33158)
Backport #33156 by @lunny Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
-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)
})