Skip to content

Commit ba5e3a5

Browse files
authored
Fix fuzz test (#33156)
1 parent 2a02734 commit ba5e3a5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/fuzz/fuzz_test.go

Lines changed: 2 additions & 0 deletions
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)