github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/cmd/bisync/testdata/test_resolve/scenario.txt (about)

     1  test resolve
     2  # Check conflict-resolution options
     3  # - Changed on Path2 and on Path1, and NOT identical       file1 (file1r, file1l)
     4  
     5  test initial bisync
     6  bisync resync
     7  
     8  test changed on both paths and NOT identical - file1 (file1R, file1L)
     9  touch-glob 2001-01-02 {datadir/} file1R.txt
    10  copy-as {datadir/}file1R.txt {path2/} file1.txt
    11  touch-glob 2001-03-04 {datadir/} file1L.txt
    12  copy-as {datadir/}file1L.txt {path1/} file1.txt
    13  
    14  test bisync run with --conflict-resolve=newer --conflict-loser=delete --conflict-suffix=potato
    15  # result should be "file1.txt", "file1.txt" (no potato)
    16  bisync conflict-resolve=newer conflict-loser=delete conflict-suffix=potato
    17  
    18  test changed on both paths and NOT identical - file1 (file1R, file1L)
    19  touch-glob 2001-07-23 {datadir/} file1R.txt
    20  copy-as {datadir/}file1R.txt {path2/} file1.txt
    21  touch-glob 2001-08-26 {datadir/} file1L.txt
    22  copy-as {datadir/}file1L.txt {path1/} file1.txt
    23  
    24  test bisync run with --conflict-resolve=path2 --conflict-loser=num --conflict-suffix=dinosaur
    25  # result should be "file1.txt.dinosaur1", "file1.txt"
    26  bisync conflict-resolve=path2 conflict-loser=num conflict-suffix=dinosaur
    27  
    28  test changed on both paths and NOT identical - file1 (file1R, file1L)
    29  touch-glob 2002-07-23 {datadir/} file1R.txt
    30  copy-as {datadir/}file1R.txt {path2/} file1.txt
    31  touch-glob 2002-08-26 {datadir/} file1L.txt
    32  copy-as {datadir/}file1L.txt {path1/} file1.txt
    33  
    34  test bisync run with --conflict-resolve=larger --conflict-loser=num --conflict-suffix=apple
    35  # result should be no winner -- "file1.txt.apple1", "file1.txt.apple2"
    36  bisync conflict-resolve=larger conflict-loser=num conflict-suffix=apple
    37  
    38  test different suffixes
    39  touch-glob 2003-07-23 {datadir/} file1R.txt
    40  copy-as {datadir/}file1R.txt {path2/} file1.txt
    41  touch-glob 2003-07-23 {datadir/} file1L.txt
    42  copy-as {datadir/}file1L.txt {path1/} file1.txt
    43  
    44  test bisync run with --conflict-resolve=older --conflict-loser=num --conflict-suffix=cloud,local
    45  # result should be no winner -- "file1.txt.cloud1", "file1.txt.local1"
    46  bisync conflict-resolve=older conflict-loser=num conflict-suffix=cloud,local
    47  
    48  test legacy
    49  touch-glob 2004-07-23 {datadir/} file1R.txt
    50  copy-as {datadir/}file1R.txt {path2/} file1.txt
    51  touch-glob 2004-07-23 {datadir/} file1L.txt
    52  copy-as {datadir/}file1L.txt {path1/} file1.txt
    53  
    54  test bisync run with --conflict-resolve=none --conflict-loser=pathname --conflict-suffix=.path
    55  # result should be no winner -- "file1.txt..path1", "file1.txt..path2"
    56  bisync conflict-resolve=none conflict-loser=pathname conflict-suffix=.path
    57  
    58  test deletes on both sides with default suffix
    59  touch-glob 2005-01-02 {datadir/} file1R.txt
    60  copy-as {datadir/}file1R.txt {path2/} file1.txt
    61  copy-as {datadir/}file1R.txt {path1/} file2.txt
    62  touch-glob 2006-03-04 {datadir/} file1L.txt
    63  copy-as {datadir/}file1L.txt {path1/} file1.txt
    64  copy-as {datadir/}file1L.txt {path2/} file2.txt
    65  
    66  test bisync run with --conflict-resolve=newer --conflict-loser=delete
    67  bisync conflict-resolve=newer conflict-loser=delete