mirror of
https://github.com/rclone/rclone.git
synced 2026-01-05 01:53:14 +00:00
bisync: test scenarios #5164
Co-authored-by: Chris Nelson <stuff@cjnaz.com>
This commit is contained in:
1
cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.copy1to2.que
vendored
Normal file
1
cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.copy1to2.que
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"subdir/file20.txt"
|
||||
1
cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.copy2to1.que
vendored
Normal file
1
cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.copy2to1.que
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"file1.txt"
|
||||
9
cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path1.lst
vendored
Normal file
9
cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path1.lst
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# bisync listing v1 from test
|
||||
- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy1.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy2.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy3.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy4.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy5.txt"
|
||||
- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt"
|
||||
- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir/file20.txt"
|
||||
9
cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path1.lst-new
vendored
Normal file
9
cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path1.lst-new
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# bisync listing v1 from test
|
||||
- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy1.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy2.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy3.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy4.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy5.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt"
|
||||
- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir/file20.txt"
|
||||
9
cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path2.lst
vendored
Normal file
9
cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path2.lst
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# bisync listing v1 from test
|
||||
- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy1.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy2.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy3.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy4.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy5.txt"
|
||||
- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt"
|
||||
- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir/file20.txt"
|
||||
9
cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path2.lst-new
vendored
Normal file
9
cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path2.lst-new
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# bisync listing v1 from test
|
||||
- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy1.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy2.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy3.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy4.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.copy5.txt"
|
||||
- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt"
|
||||
- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt"
|
||||
33
cmd/bisync/testdata/test_basic/golden/test.log
vendored
Normal file
33
cmd/bisync/testdata/test_basic/golden/test.log
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
(01) : test basic
|
||||
|
||||
|
||||
(02) : test initial bisync
|
||||
(03) : bisync resync
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Copying unique Path2 files to Path1
|
||||
INFO : Resynching Path1 to Path2
|
||||
INFO : Resync updating listings
|
||||
INFO : Bisync successful
|
||||
|
||||
(04) : test place newer files on both paths
|
||||
|
||||
(05) : touch-copy 2001-01-02 {datadir/}file1.txt {path2/}
|
||||
(06) : copy-as {datadir/}file1.txt {path1/}subdir file20.txt
|
||||
|
||||
(07) : test bisync run
|
||||
(08) : bisync
|
||||
INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"
|
||||
INFO : Path1 checking for diffs
|
||||
INFO : - Path1 File is newer - subdir/file20.txt
|
||||
INFO : Path1: 1 changes: 0 new, 1 newer, 0 older, 0 deleted
|
||||
INFO : Path2 checking for diffs
|
||||
INFO : - Path2 File is newer - file1.txt
|
||||
INFO : Path2: 1 changes: 0 new, 1 newer, 0 older, 0 deleted
|
||||
INFO : Applying changes
|
||||
INFO : - Path1 Queue copy to Path2 - {path2/}subdir/file20.txt
|
||||
INFO : - Path2 Queue copy to Path1 - {path1/}file1.txt
|
||||
INFO : - Path2 Do queued copies to - Path1
|
||||
INFO : - Path1 Do queued copies to - Path2
|
||||
INFO : Updating listings
|
||||
INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}"
|
||||
INFO : Bisync successful
|
||||
1
cmd/bisync/testdata/test_basic/initial/RCLONE_TEST
vendored
Normal file
1
cmd/bisync/testdata/test_basic/initial/RCLONE_TEST
vendored
Normal file
@@ -0,0 +1 @@
|
||||
This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete.
|
||||
0
cmd/bisync/testdata/test_basic/initial/file1.copy1.txt
vendored
Normal file
0
cmd/bisync/testdata/test_basic/initial/file1.copy1.txt
vendored
Normal file
0
cmd/bisync/testdata/test_basic/initial/file1.copy2.txt
vendored
Normal file
0
cmd/bisync/testdata/test_basic/initial/file1.copy2.txt
vendored
Normal file
0
cmd/bisync/testdata/test_basic/initial/file1.copy3.txt
vendored
Normal file
0
cmd/bisync/testdata/test_basic/initial/file1.copy3.txt
vendored
Normal file
0
cmd/bisync/testdata/test_basic/initial/file1.copy4.txt
vendored
Normal file
0
cmd/bisync/testdata/test_basic/initial/file1.copy4.txt
vendored
Normal file
0
cmd/bisync/testdata/test_basic/initial/file1.copy5.txt
vendored
Normal file
0
cmd/bisync/testdata/test_basic/initial/file1.copy5.txt
vendored
Normal file
0
cmd/bisync/testdata/test_basic/initial/file1.txt
vendored
Normal file
0
cmd/bisync/testdata/test_basic/initial/file1.txt
vendored
Normal file
0
cmd/bisync/testdata/test_basic/initial/subdir/file20.txt
vendored
Normal file
0
cmd/bisync/testdata/test_basic/initial/subdir/file20.txt
vendored
Normal file
1
cmd/bisync/testdata/test_basic/modfiles/file1.txt
vendored
Normal file
1
cmd/bisync/testdata/test_basic/modfiles/file1.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
This file is newer
|
||||
13
cmd/bisync/testdata/test_basic/scenario.txt
vendored
Normal file
13
cmd/bisync/testdata/test_basic/scenario.txt
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
test basic
|
||||
# Simple test case for development
|
||||
|
||||
test initial bisync
|
||||
bisync resync
|
||||
|
||||
test place newer files on both paths
|
||||
# force specific modification time since file time is lost through git
|
||||
touch-copy 2001-01-02 {datadir/}file1.txt {path2/}
|
||||
copy-as {datadir/}file1.txt {path1/}subdir file20.txt
|
||||
|
||||
test bisync run
|
||||
bisync
|
||||
Reference in New Issue
Block a user