()
| 313 | |
| 314 | #[test] |
| 315 | fn anomaly_detection() { |
| 316 | let m = AuthMetrics::new(); |
| 317 | for _ in 0..50 { |
| 318 | m.record_auth_failure("password"); |
| 319 | } |
| 320 | assert!(m.failed_login_spike(10)); |
| 321 | assert!(!m.failed_login_spike(100)); |
| 322 | } |
| 323 | |
| 324 | #[test] |
| 325 | fn circuit_breaker() { |
nothing calls this directly
no test coverage detected