()
| 301 | |
| 302 | #[test] |
| 303 | fn ip_requirement() { |
| 304 | let auth = test_auth(); |
| 305 | let cond = GrantCondition::RequireIp { |
| 306 | allowed_cidrs: vec!["10.0.0.0/8".into()], |
| 307 | }; |
| 308 | assert!(evaluate_conditions(std::slice::from_ref(&cond), &auth, "10.0.0.5").is_ok()); |
| 309 | assert!(evaluate_conditions(std::slice::from_ref(&cond), &auth, "192.168.1.1").is_err()); |
| 310 | } |
| 311 | |
| 312 | #[test] |
| 313 | fn step_up_auth() { |
nothing calls this directly
no test coverage detected