host: preserve bundle symlinks and finish integration test isolation

This commit is contained in:
2026-11-07 20:58:33 +00:00
parent 7bd8bfe4d2
commit cab9ceb6f6
7 changed files with 35 additions and 16 deletions
+9
View File
@@ -21,6 +21,9 @@ fn world_copies_programs_and_nested_source_only_once() -> anyhow::Result<()> {
b"ref: refs/heads/main\n",
)?;
std::fs::write(bundle.join("src/sausage/README.md"), b"source")?;
for (name, target) in [("readme-link", "README.md"), ("broken-link", "missing.wasm")] {
std::os::unix::fs::symlink(target, bundle.join("src/sausage").join(name))?;
}
let path = temp.path().join("world");
let _world = World::open_with_userland(&path, Some(&bundle))?;
assert_eq!(
@@ -32,6 +35,12 @@ fn world_copies_programs_and_nested_source_only_once() -> anyhow::Result<()> {
b"source"
);
assert!(path.join("world/src/sausage/.git/HEAD").is_file());
for (name, target) in [("readme-link", "README.md"), ("broken-link", "missing.wasm")] {
assert_eq!(
std::fs::read_link(path.join("world/src/sausage").join(name))?,
Path::new(target)
);
}
std::fs::write(path.join("world/src/sausage/README.md"), b"agent patch")?;
let _world = World::open_with_userland(&path, Some(Path::new("/missing-bundle")))?;
assert_eq!(