()
| 1787 | |
| 1788 | #[test] |
| 1789 | fn validate_rejects_path_too_long() { |
| 1790 | let mut policy = restrictive_default_policy(); |
| 1791 | let long_path = format!("/{}", "a".repeat(5000)); |
| 1792 | policy.filesystem = Some(FilesystemPolicy { |
| 1793 | include_workdir: true, |
| 1794 | read_only: vec![long_path], |
| 1795 | read_write: vec!["/tmp".into()], |
| 1796 | }); |
| 1797 | let violations = validate_sandbox_policy(&policy).unwrap_err(); |
| 1798 | assert!( |
| 1799 | violations |
| 1800 | .iter() |
| 1801 | .any(|v| matches!(v, PolicyViolation::FieldTooLong { .. })) |
| 1802 | ); |
| 1803 | } |
| 1804 | |
| 1805 | #[test] |
| 1806 | fn validate_rejects_tld_wildcard() { |
nothing calls this directly
no test coverage detected