Files
Morax 49158b2d9f bisync: make --max-delete aware of --track-renames
Add an opt-in preflight that excludes only guaranteed tracked renames
from the max-delete count. Reuse normal bisync listing metadata,
validate strategy and flag conflicts early, and skip preflight work
when --force bypasses the safety check.

The max_delete_track_renames scenario uses the default hash
track-renames strategy, which requires a hash common to both paths.
Skip it on remote combinations without one, such as crypt, instead of
failing the integration tests.

Fixes #8685
2026-09-30 17:53:20 +01:00

68 lines
2.7 KiB
Plaintext

test max-delete-track-renames
# - Set up with 9 files.
# - Rename 5 files on Path1, exceeding the default max-delete threshold.
# - Confirm --track-renames alone retains the existing safety abort.
# - Confirm the opt-in rename-aware check permits the tracked renames.
test resync bypasses rename-aware hash preflight with ignored listing checksums
bisync resync track-renames max-delete-renames-aware ignore-listing-checksum
test rename-aware max-delete requires track-renames
bisync max-delete-renames-aware
copy-listings requires-track-fail
test rename-aware max-delete rejects invalid track-renames strategies early
bisync track-renames max-delete-renames-aware track-renames-strategy=banana
copy-listings invalid-strategy-fail
test rename-aware hash matching rejects ignored listing checksums
bisync track-renames max-delete-renames-aware ignore-listing-checksum
copy-listings ignore-hash-fail
test rename >50% of Path1 files
copy-as {path1/}file1.txt {path1/} renamed-file1.txt
delete-file {path1/}file1.txt
copy-as {path1/}file2.txt {path1/} renamed-file2.txt
delete-file {path1/}file2.txt
copy-as {path1/}file3.txt {path1/} renamed-file3.txt
delete-file {path1/}file3.txt
copy-as {path1/}file4.txt {path1/} renamed-file4.txt
delete-file {path1/}file4.txt
copy-as {path1/}file5.txt {path1/} renamed-file5.txt
delete-file {path1/}file5.txt
test track-renames alone should retain the max-delete safety abort
bisync track-renames
copy-listings initial-fail
test rename-aware max-delete should permit tracked renames
bisync track-renames max-delete-renames-aware
test rename-aware max-delete should work from Path2
copy-as {path2/}renamed-file1.txt {path2/} renamed2-file1.txt
delete-file {path2/}renamed-file1.txt
copy-as {path2/}renamed-file2.txt {path2/} renamed2-file2.txt
delete-file {path2/}renamed-file2.txt
copy-as {path2/}renamed-file3.txt {path2/} renamed2-file3.txt
delete-file {path2/}renamed-file3.txt
copy-as {path2/}renamed-file4.txt {path2/} renamed2-file4.txt
delete-file {path2/}renamed-file4.txt
copy-as {path2/}renamed-file5.txt {path2/} renamed2-file5.txt
delete-file {path2/}renamed-file5.txt
bisync track-renames max-delete-renames-aware
test unmatched deletes should still exceed max-delete
copy-as {path1/}renamed2-file1.txt {path1/} moved-file1.txt
delete-file {path1/}renamed2-file1.txt
delete-file {path1/}renamed2-file2.txt
delete-file {path1/}renamed2-file3.txt
delete-file {path1/}renamed2-file4.txt
delete-file {path1/}renamed2-file5.txt
delete-file {path1/}file6.txt
delete-file {path1/}file7.txt
bisync track-renames max-delete-renames-aware
copy-listings partial-fail
test force bypasses max-delete and rename-aware hash preflight
bisync track-renames max-delete-renames-aware ignore-listing-checksum force