mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-31 18:05:00 -05:00
Fix fuzz test (#33156)
(cherry picked from commit ba5e3a5161a497aa8c73827774870fb94676e68b)
This commit is contained in:
parent
f809052193
commit
d09b8ba9cf
1 changed files with 2 additions and 0 deletions
|
@ -27,6 +27,7 @@ var renderContext = 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(&renderContext, bytes.NewReader(data), io.Discard)
|
||||
})
|
||||
|
@ -34,6 +35,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.PostProcess(&renderContext, bytes.NewReader(data), io.Discard)
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue