host: preserve bundle symlinks and finish integration test isolation
This commit is contained in:
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user