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

     1  test rclone-args
     2  # Pass generic flags to rclone under test using as an example
     3  # the --size-only flag, which changes the meaning of operations.
     4  
     5  # force specific modification time since file time is lost through git
     6  touch-glob 2001-01-02 {datadir/} *
     7  
     8  test initial bisync
     9  bisync resync checksum
    10  
    11  test place newer files on both paths
    12  copy-file {datadir/}file1.txt {path1/}
    13  copy-file {datadir/}file2.txt {path2/}
    14  copy-file {datadir/}file20.txt {path1/}subdir
    15  copy-file {datadir/}file21.txt {path2/}subdir
    16  
    17  # re-touch dest to avoid race conditions with parallel tests
    18  touch-glob 2001-01-02 {path1/} file1.txt
    19  touch-glob 2001-01-02 {path2/} file2.txt
    20  touch-glob 2001-01-02 {path1/}subdir/ file20.txt
    21  touch-glob 2001-01-02 {path2/}subdir/ file21.txt
    22  
    23  test run bisync with custom options
    24  bisync checksum
    25  
    26  touch-glob 2007-07-23 {datadir/} *
    27  
    28  copy-file {datadir/}file1.txt {path1/}
    29  copy-file {datadir/}file2.txt {path2/}
    30  copy-file {datadir/}file20.txt {path1/}subdir
    31  copy-as {datadir/}file21.txt {path2/} file1.txt
    32  
    33  # re-touch dest to avoid race conditions with parallel tests
    34  touch-glob 2007-07-23 {path1/} file1.txt
    35  touch-glob 2007-07-23 {path2/} file2.txt
    36  touch-glob 2007-07-23 {path1/}subdir/ file20.txt
    37  touch-glob 2007-07-23 {path2/}subdir/ file21.txt
    38  
    39  bisync size-only
    40  bisync resync
    41  
    42  copy-file {datadir/}file1.txt {path1/}
    43  copy-file {datadir/}file2.txt {path2/}
    44  copy-file {datadir/}file20.txt {path1/}subdir
    45  copy-file {datadir/}file21.txt {path2/}subdir
    46  
    47  # re-touch dest to avoid race conditions with parallel tests
    48  touch-glob 2007-07-23 {path1/} file1.txt
    49  touch-glob 2007-07-23 {path2/} file2.txt
    50  touch-glob 2007-07-23 {path1/}subdir/ file20.txt
    51  touch-glob 2007-07-23 {path2/}subdir/ file21.txt
    52  
    53  bisync ignore-size
    54  
    55  bisync resync compare-all
    56  
    57  copy-as {datadir/}file21.txt {path2/} file2.txt
    58  
    59  touch-glob 2023-08-26 {datadir/} *
    60  
    61  copy-file {datadir/}file1.txt {path1/}
    62  
    63  copy-file {datadir/}file20.txt {path1/}subdir
    64  copy-file {datadir/}file21.txt {path2/}subdir
    65  
    66  # re-touch dest to avoid race conditions with parallel tests
    67  touch-glob 2007-07-23 {path2/} file2.txt
    68  touch-glob 2023-08-26 {path1/} file1.txt
    69  touch-glob 2023-08-26 {path1/}subdir/ file20.txt
    70  touch-glob 2023-08-26 {path2/}subdir/ file21.txt
    71  
    72  bisync compare-all