test(parity): ignore the untransferred source-root line in %C diff

This commit is contained in:
2026-09-16 23:13:22 +02:00
parent 12d4af1b89
commit 6200b298ac
+9 -1
View File
@@ -309,7 +309,15 @@ class TestWireStatsParity:
result, _ = run_client(source, dest, flags=["-a", "--out-format=" + fmt],
port=shared_server.port)
assert result.returncode == 0, result.stderr[:300]
assert result.stdout.splitlines() == rsync_result.stdout.splitlines(), (
def file_lines(text):
# Ignore the root directory entry: fastsync does not transfer the
# source-root dir itself (a separate pre-existing divergence).
return [
line for line in text.splitlines() if not line.rsplit(" ", 1)[-1].endswith("/")
]
assert file_lines(result.stdout) == file_lines(rsync_result.stdout), (
f"rsync={rsync_result.stdout!r} fastsync={result.stdout!r}"
)