mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Fix fuzz test (#33156)
This commit is contained in:
		| @@ -19,6 +19,7 @@ func newFuzzRenderContext() *markup.RenderContext { | |||||||
|  |  | ||||||
| func FuzzMarkdownRenderRaw(f *testing.F) { | func FuzzMarkdownRenderRaw(f *testing.F) { | ||||||
| 	f.Fuzz(func(t *testing.T, data []byte) { | 	f.Fuzz(func(t *testing.T, data []byte) { | ||||||
|  | 		setting.IsInTesting = true | ||||||
| 		setting.AppURL = "http://localhost:3000/" | 		setting.AppURL = "http://localhost:3000/" | ||||||
| 		markdown.RenderRaw(newFuzzRenderContext(), bytes.NewReader(data), io.Discard) | 		markdown.RenderRaw(newFuzzRenderContext(), bytes.NewReader(data), io.Discard) | ||||||
| 	}) | 	}) | ||||||
| @@ -26,6 +27,7 @@ func FuzzMarkdownRenderRaw(f *testing.F) { | |||||||
|  |  | ||||||
| func FuzzMarkupPostProcess(f *testing.F) { | func FuzzMarkupPostProcess(f *testing.F) { | ||||||
| 	f.Fuzz(func(t *testing.T, data []byte) { | 	f.Fuzz(func(t *testing.T, data []byte) { | ||||||
|  | 		setting.IsInTesting = true | ||||||
| 		setting.AppURL = "http://localhost:3000/" | 		setting.AppURL = "http://localhost:3000/" | ||||||
| 		markup.PostProcessDefault(newFuzzRenderContext(), bytes.NewReader(data), io.Discard) | 		markup.PostProcessDefault(newFuzzRenderContext(), bytes.NewReader(data), io.Discard) | ||||||
| 	}) | 	}) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user