Skip to content

Commit 12c24c2

Browse files
GiteaBotlunny
andauthored
Fix fuzz test (#33156) (#33158)
Backport #33156 by @lunny Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 parent a330f42 commit 12c24c2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/fuzz/fuzz_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ func newFuzzRenderContext() *markup.RenderContext {
1919

2020
func FuzzMarkdownRenderRaw(f *testing.F) {
2121
f.Fuzz(func(t *testing.T, data []byte) {
22+
setting.IsInTesting = true
2223
setting.AppURL = "http://localhost:3000/"
2324
markdown.RenderRaw(newFuzzRenderContext(), bytes.NewReader(data), io.Discard)
2425
})
2526
}
2627

2728
func FuzzMarkupPostProcess(f *testing.F) {
2829
f.Fuzz(func(t *testing.T, data []byte) {
30+
setting.IsInTesting = true
2931
setting.AppURL = "http://localhost:3000/"
3032
markup.PostProcessDefault(newFuzzRenderContext(), bytes.NewReader(data), io.Discard)
3133
})

0 commit comments

Comments
 (0)