test: property-based fuzzing (proptest) for every untrusted-input parser — message line, PROXY header, WebSocket frame, regex engine, ban-mask, duration; asserts no-panic + round-trip/idempotence/bounds invariants

This commit is contained in:
Jean Chevronnet 2026-08-18 22:17:17 +00:00
parent cf2b157842
commit 621f06448d
7 changed files with 85 additions and 0 deletions

View file

@ -371,3 +371,17 @@ impl Server {
}
}
}
#[cfg(test)]
mod tests {
use super::*;
use proptest::prelude::*;
proptest! {
// Fuzz the duration parser: no arbitrary string may panic it.
#[test]
fn parse_duration_never_panics(s in ".*") {
let _ = parse_duration(&s);
}
}
}