diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2025-01-08 23:15:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-09 15:15:47 +0800 |
commit | ba5e3a5161a497aa8c73827774870fb94676e68b (patch) | |
tree | b4da4e89fc88da1a11e4e75ddca7f1c69af9cc68 | |
parent | 2a02734f93c0091275c77e370b7eed03b2c5f18e (diff) | |
download | gitea-ba5e3a5161a497aa8c73827774870fb94676e68b.tar.gz gitea-ba5e3a5161a497aa8c73827774870fb94676e68b.zip |
Fix fuzz test (#33156)
-rw-r--r-- | tests/fuzz/fuzz_test.go | 2 |
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) }) |