github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/cmd/bisync/testdata/test_resync/scenario.txt (about) 1 test resync 2 # 1. Resync with empty Path1, resulting in copying all content FROM Path2 3 # 2. Resync with empty Path2, resulting in synching all content TO Path2 4 # 3. Exercise all of the various file difference scenarios during a resync: 5 # File Path1 Path2 Expected action Who wins 6 # - file1.txt Exists Missing Sync Path1 >Path2 Path1 7 # - file2.txt Missing Exists Copy Path2 >Path1 Path2 8 # - file3.txt Exists Newer date Sync Path1 >Path2 Path1 9 # - file4.txt Missing Newer date Copy Path2 >Path1 Path2 10 # - file5.txt Exists Older date Sync Path1 >Path2 Path1 11 # - file6.txt Older date Newer date Sync Path1 >Path2 Path1 12 # - file7.txt Exists Exists (same) None Same 13 # 4. Confirm critical error on a normal sync of empty path 14 15 test 1. resync with empty path1, resulting in copying all content from path2. 16 purge-children {path1/} 17 bisync resync 18 move-listings empty-path1 19 20 test 2. resync with empty path2, resulting in synching all content to path2. 21 purge-children {path2/} 22 bisync resync 23 move-listings empty-path2 24 25 test 3. exercise all of the various file difference scenarios during a resync. 26 touch-glob 2002-02-02 {datadir/} fileA.txt 27 touch-glob 1999-09-09 {datadir/} fileB.txt 28 29 test = file - path1 - path2 - expected action - who wins 30 test - file1.txt - exists - missing - sync path1 > path2 - path1 31 delete-file {path2/}file1.txt 32 33 test - file2.txt - missing - exists - copy path2 > path1 - path2 34 delete-file {path1/}file2.txt 35 36 test - file3.txt - exists - newer date - sync path1 > path2 - path1 37 copy-as {datadir/}fileA.txt {path2/} file3.txt 38 39 test - file4.txt - missing - newer date - copy path2 > path1 - path2 40 delete-file {path1/}file4.txt 41 copy-as {datadir/}fileA.txt {path2/} file4.txt 42 43 test - file5.txt - exists - older date - sync path1 > path2 - path1 44 copy-as {datadir/}fileB.txt {path2/} file5.txt 45 46 test - file6.txt - older date - newer date - sync path1 > path2 - path1 47 copy-as {datadir/}fileB.txt {path1/} file6.txt 48 copy-as {datadir/}fileA.txt {path2/} file6.txt 49 50 test - file7.txt - exists - exists (same) - none - same 51 52 test run bisync with resync 53 bisync resync 54 copy-listings mixed-diffs 55 56 test run normal bisync 57 bisync 58 59 test 4. confirm critical error on normal sync of empty path. 60 purge-children {path2/} 61 bisync