()
| 883 | |
| 884 | #[test] |
| 885 | fn test_parse_lsblk_vroc() { |
| 886 | let fixture = include_str!("../tests/fixtures/lsblk-vroc.json"); |
| 887 | let devs: DevicesOutput = serde_json::from_str(fixture).unwrap(); |
| 888 | assert_eq!(devs.blockdevices.len(), 2); |
| 889 | |
| 890 | // find_partition_of_esp recurses through the md126 RAID array to |
| 891 | // locate the ESP (md126p1) even though it is not a direct child of |
| 892 | // the NVMe disk. |
| 893 | for nvme in &devs.blockdevices { |
| 894 | let esp = nvme.find_partition_of_esp().unwrap(); |
| 895 | assert_eq!(esp.name, "md126p1"); |
| 896 | assert_eq!(esp.partn, Some(1)); |
| 897 | assert_eq!(esp.parttype.as_deref().unwrap(), ESP); |
| 898 | assert_eq!(esp.fstype.as_deref().unwrap(), "vfat"); |
| 899 | } |
| 900 | } |
| 901 | |
| 902 | #[test] |
| 903 | fn test_parse_lsblk_swraid() { |
nothing calls this directly
no test coverage detected