()
| 915 | } |
| 916 | |
| 917 | fn passing_fixture() -> Result<cap_std_ext::cap_tempfile::TempDir> { |
| 918 | // Create a temporary directory fixture that is expected to pass most lints. |
| 919 | let root = cap_std_ext::cap_tempfile::tempdir(cap_std::ambient_authority())?; |
| 920 | for d in API_DIRS { |
| 921 | root.create_dir(d)?; |
| 922 | } |
| 923 | root.create_dir_all("usr/lib/modules/5.7.2")?; |
| 924 | root.write("usr/lib/modules/5.7.2/vmlinuz", "vmlinuz")?; |
| 925 | |
| 926 | root.create_dir("boot")?; |
| 927 | root.create_dir("sysroot")?; |
| 928 | root.symlink_contents("sysroot/ostree", "ostree")?; |
| 929 | |
| 930 | const PREPAREROOT_PATH: &str = "usr/lib/ostree/prepare-root.conf"; |
| 931 | const PREPAREROOT: &str = |
| 932 | include_str!("../../../baseimage/base/usr/lib/ostree/prepare-root.conf"); |
| 933 | root.create_dir_all(Utf8Path::new(PREPAREROOT_PATH).parent().unwrap())?; |
| 934 | root.atomic_write(PREPAREROOT_PATH, PREPAREROOT)?; |
| 935 | |
| 936 | Ok(root) |
| 937 | } |
| 938 | |
| 939 | #[test] |
| 940 | fn test_var_run() -> Result<()> { |
no outgoing calls