()
| 1770 | |
| 1771 | #[test] |
| 1772 | fn validate_rejects_too_many_paths() { |
| 1773 | let mut policy = restrictive_default_policy(); |
| 1774 | let many_paths: Vec<String> = (0..300).map(|i| format!("/path/{i}")).collect(); |
| 1775 | policy.filesystem = Some(FilesystemPolicy { |
| 1776 | include_workdir: true, |
| 1777 | read_only: many_paths, |
| 1778 | read_write: vec!["/tmp".into()], |
| 1779 | }); |
| 1780 | let violations = validate_sandbox_policy(&policy).unwrap_err(); |
| 1781 | assert!( |
| 1782 | violations |
| 1783 | .iter() |
| 1784 | .any(|v| matches!(v, PolicyViolation::TooManyPaths { .. })) |
| 1785 | ); |
| 1786 | } |
| 1787 | |
| 1788 | #[test] |
| 1789 | fn validate_rejects_path_too_long() { |
nothing calls this directly
no test coverage detected