MCPcopy Create free account
hub / github.com/bootc-dev/bootc / test_parse_lsblk_vroc

Function test_parse_lsblk_vroc

crates/blockdev/src/blockdev.rs:885–900  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 1

find_partition_of_espMethod · 0.80

Tested by

no test coverage detected