fix: honor hardlinks across client mount topology
This commit is contained in:
@@ -78,6 +78,25 @@ class ClientJobHappyPathTests(unittest.TestCase):
|
||||
content=b"x" * 4096,
|
||||
)
|
||||
|
||||
def test_mount_boundary_requires_copy_space_even_with_same_device(self):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory)
|
||||
source_root = root / "source"
|
||||
destination_root = root / "destination"
|
||||
source_root.mkdir()
|
||||
destination_root.mkdir()
|
||||
(source_root / "fixture.bin").write_bytes(b"fixture")
|
||||
with patch(
|
||||
"archive_clients.jobs._mount_id",
|
||||
side_effect=("source-mount", "destination-mount"),
|
||||
):
|
||||
required = ClientJobExecutor._copy_required_bytes(
|
||||
source_root,
|
||||
destination_root,
|
||||
(("fixture.bin", 7),),
|
||||
)
|
||||
self.assertEqual(required, 7)
|
||||
|
||||
def _run_transfer(
|
||||
self,
|
||||
root: Path,
|
||||
|
||||
Reference in New Issue
Block a user