Skip to content

Commit

Permalink
Fix fuzz test (#33156) (#33158)
Browse files Browse the repository at this point in the history
Backport #33156 by @lunny

Co-authored-by: Lunny Xiao <[email protected]>
  • Loading branch information
GiteaBot and lunny authored Jan 9, 2025
1 parent a330f42 commit 12c24c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/fuzz/fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ 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)
})
}

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)
})
Expand Down

0 comments on commit 12c24c2

Please sign in to comment.