mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-18 14:47:03 +00:00
test: Update fuzz tests to use the built-in infrastructure
Go 1.18 supports fuzzing natively, so this patch migrates our fuzzing tests to make use of it.
This commit is contained in:
@@ -285,3 +285,10 @@ func TestReload(t *testing.T) {
|
||||
t.Errorf("unexpected error reloading wrapped backend: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Fuzz testing for the response decoder, which handles user-provided data.
|
||||
func FuzzDecodeResponse(f *testing.F) {
|
||||
f.Fuzz(func(t *testing.T, response string) {
|
||||
DecodeResponse(response)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user