Restore persistent system path composition

This commit is contained in:
ms2k 2026-07-22 03:07:42 +09:00
commit 7aff8e542e

View file

@ -525,22 +525,46 @@ fn destination_layout_is_materialized_and_canonical_in_artifact_identity() {
first.id_map = id_map_with_container_root();
first.destinations = vec![
PreparedDestination {
path: "/workspace".into(),
path: "/root".into(),
kind: PreparedDestinationKind::Directory,
},
PreparedDestination {
path: "/run/lazaret/bin/entry".into(),
path: "/usr".into(),
kind: PreparedDestinationKind::Directory,
},
PreparedDestination {
path: "/var".into(),
kind: PreparedDestinationKind::Directory,
},
PreparedDestination {
path: "/etc".into(),
kind: PreparedDestinationKind::Directory,
},
PreparedDestination {
path: "/opt".into(),
kind: PreparedDestinationKind::Directory,
},
PreparedDestination {
path: "/etc/resolv.conf".into(),
kind: PreparedDestinationKind::RegularFile,
},
PreparedDestination {
path: "/workspace".into(),
kind: PreparedDestinationKind::Directory,
path: "/etc/hosts".into(),
kind: PreparedDestinationKind::RegularFile,
},
PreparedDestination {
path: "/etc/hostname".into(),
kind: PreparedDestinationKind::RegularFile,
},
];
let artifact = fixture.store.prepare(&first).unwrap();
let root = fixture.artifact_root(&artifact);
assert!(root.join("workspace").is_dir());
assert!(root.join("run/lazaret/bin/entry").is_file());
for destination in ["root", "usr", "var", "etc", "opt"] {
assert!(root.join(destination).is_dir());
}
for destination in ["etc/resolv.conf", "etc/hosts", "etc/hostname"] {
assert!(root.join(destination).is_file());
}
let mut reordered = fixture.request(73, &[(bytes.clone(), OCI_TAR)]);
reordered.id_map = id_map_with_container_root();