diff --git a/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.copy1to2.que b/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.copy1to2.que new file mode 100644 index 000000000..529e69f11 --- /dev/null +++ b/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.copy1to2.que @@ -0,0 +1,8 @@ +"RCLONE_TEST" +"file1.copy1.txt" +"file1.copy2.txt" +"file1.copy3.txt" +"file1.copy4.txt" +"file1.copy5.txt" +"file1.txt" +"subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..b570eb902 --- /dev/null +++ b/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,9 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2004-01-02T00:00:00.000000000+0000 "RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..b570eb902 --- /dev/null +++ b/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,9 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2004-01-02T00:00:00.000000000+0000 "RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..b570eb902 --- /dev/null +++ b/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,9 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2004-01-02T00:00:00.000000000+0000 "RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.copy5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2004-01-02T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..2f8714b93 --- /dev/null +++ b/cmd/bisync/testdata/test_all_changed/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,9 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2005-01-02T00:00:00.000000000+0000 "file1.copy1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2005-01-02T00:00:00.000000000+0000 "file1.copy2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2005-01-02T00:00:00.000000000+0000 "file1.copy3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2005-01-02T00:00:00.000000000+0000 "file1.copy4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2005-01-02T00:00:00.000000000+0000 "file1.copy5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2005-01-02T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2005-01-02T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_all_changed/golden/test.log b/cmd/bisync/testdata/test_all_changed/golden/test.log new file mode 100644 index 000000000..af0c24c5d --- /dev/null +++ b/cmd/bisync/testdata/test_all_changed/golden/test.log @@ -0,0 +1,90 @@ +(01) : test all-changed + + +(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 change timestamp on all files except RCLONE_TEST +(05) : touch-glob 2005-01-02 {path1/} file* +(06) : touch-glob 2005-01-02 {path1/}subdir file* + +(07) : test sync should pass +(08) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File is newer - file1.copy1.txt +INFO : - Path1 File is newer - file1.copy2.txt +INFO : - Path1 File is newer - file1.copy3.txt +INFO : - Path1 File is newer - file1.copy4.txt +INFO : - Path1 File is newer - file1.copy5.txt +INFO : - Path1 File is newer - file1.txt +INFO : - Path1 File is newer - subdir/file20.txt +INFO : Path1: 7 changes: 0 new, 7 newer, 0 older, 0 deleted +INFO : Path2 checking for diffs +INFO : Applying changes +INFO : - Path1 Queue copy to Path2 - {path2/}file1.copy1.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file1.copy2.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file1.copy3.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file1.copy4.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file1.copy5.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file1.txt +INFO : - Path1 Queue copy to Path2 - {path2/}subdir/file20.txt +INFO : - Path1 Do queued copies to - Path2 +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful + +(09) : test change timestamp on all files including RCLONE_TEST +(10) : touch-glob 2004-01-02 {path1/} * +(11) : touch-glob 2004-01-02 {path1/}subdir * + +(12) : test sync should fail +(13) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File is OLDER - file1.copy1.txt +INFO : - Path1 File is OLDER - file1.copy2.txt +INFO : - Path1 File is OLDER - file1.copy3.txt +INFO : - Path1 File is OLDER - file1.copy4.txt +INFO : - Path1 File is OLDER - file1.copy5.txt +INFO : - Path1 File is OLDER - file1.txt +INFO : - Path1 File is OLDER - subdir/file20.txt +INFO : - Path1 File is newer - RCLONE_TEST +INFO : Path1: 8 changes: 0 new, 1 newer, 7 older, 0 deleted +INFO : Path2 checking for diffs +ERROR : Safety abort: all files were changed on Path1 "{path1/}". Run with --force if desired. +NOTICE: Bisync aborted. Please try again. +Bisync error: all files were changed + +(14) : test sync with force should pass +(15) : bisync force +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File is OLDER - file1.copy1.txt +INFO : - Path1 File is OLDER - file1.copy2.txt +INFO : - Path1 File is OLDER - file1.copy3.txt +INFO : - Path1 File is OLDER - file1.copy4.txt +INFO : - Path1 File is OLDER - file1.copy5.txt +INFO : - Path1 File is OLDER - file1.txt +INFO : - Path1 File is OLDER - subdir/file20.txt +INFO : - Path1 File is newer - RCLONE_TEST +INFO : Path1: 8 changes: 0 new, 1 newer, 7 older, 0 deleted +INFO : Path2 checking for diffs +INFO : Applying changes +INFO : - Path1 Queue copy to Path2 - {path2/}RCLONE_TEST +INFO : - Path1 Queue copy to Path2 - {path2/}file1.copy1.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file1.copy2.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file1.copy3.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file1.copy4.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file1.copy5.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file1.txt +INFO : - Path1 Queue copy to Path2 - {path2/}subdir/file20.txt +INFO : - Path1 Do queued copies to - Path2 +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful diff --git a/cmd/bisync/testdata/test_all_changed/initial/RCLONE_TEST b/cmd/bisync/testdata/test_all_changed/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_all_changed/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_all_changed/initial/file1.copy1.txt b/cmd/bisync/testdata/test_all_changed/initial/file1.copy1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_all_changed/initial/file1.copy2.txt b/cmd/bisync/testdata/test_all_changed/initial/file1.copy2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_all_changed/initial/file1.copy3.txt b/cmd/bisync/testdata/test_all_changed/initial/file1.copy3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_all_changed/initial/file1.copy4.txt b/cmd/bisync/testdata/test_all_changed/initial/file1.copy4.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_all_changed/initial/file1.copy5.txt b/cmd/bisync/testdata/test_all_changed/initial/file1.copy5.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_all_changed/initial/file1.txt b/cmd/bisync/testdata/test_all_changed/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_all_changed/initial/subdir/file20.txt b/cmd/bisync/testdata/test_all_changed/initial/subdir/file20.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_all_changed/scenario.txt b/cmd/bisync/testdata/test_all_changed/scenario.txt new file mode 100644 index 000000000..1923a7bf1 --- /dev/null +++ b/cmd/bisync/testdata/test_all_changed/scenario.txt @@ -0,0 +1,29 @@ +test all-changed +# Check trap for all files changed logic +# +# Setup initial state +# Change timestamp on all files except RCLONE_TEST +# Sync should pass +# Change timestamp on all files including RCLONE_TEST +# Sync should fail +# Sync with --force should pass + +test initial bisync +bisync resync + +test change timestamp on all files except RCLONE_TEST +touch-glob 2005-01-02 {path1/} file* +touch-glob 2005-01-02 {path1/}subdir file* + +test sync should pass +bisync + +test change timestamp on all files including RCLONE_TEST +touch-glob 2004-01-02 {path1/} * +touch-glob 2004-01-02 {path1/}subdir * + +test sync should fail +bisync + +test sync with force should pass +bisync force diff --git a/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.copy1to2.que b/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.copy1to2.que new file mode 100644 index 000000000..a49deb16c --- /dev/null +++ b/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.copy1to2.que @@ -0,0 +1 @@ +"subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.copy2to1.que b/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.copy2to1.que new file mode 100644 index 000000000..029f3e190 --- /dev/null +++ b/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.copy2to1.que @@ -0,0 +1 @@ +"file1.txt" diff --git a/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..86b9e86ee --- /dev/null +++ b/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path1.lst @@ -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" diff --git a/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..465d2455d --- /dev/null +++ b/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -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" diff --git a/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..86b9e86ee --- /dev/null +++ b/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path2.lst @@ -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" diff --git a/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..9e8bc8a1a --- /dev/null +++ b/cmd/bisync/testdata/test_basic/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -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" diff --git a/cmd/bisync/testdata/test_basic/golden/test.log b/cmd/bisync/testdata/test_basic/golden/test.log new file mode 100644 index 000000000..e82d9c88e --- /dev/null +++ b/cmd/bisync/testdata/test_basic/golden/test.log @@ -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 diff --git a/cmd/bisync/testdata/test_basic/initial/RCLONE_TEST b/cmd/bisync/testdata/test_basic/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_basic/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_basic/initial/file1.copy1.txt b/cmd/bisync/testdata/test_basic/initial/file1.copy1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_basic/initial/file1.copy2.txt b/cmd/bisync/testdata/test_basic/initial/file1.copy2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_basic/initial/file1.copy3.txt b/cmd/bisync/testdata/test_basic/initial/file1.copy3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_basic/initial/file1.copy4.txt b/cmd/bisync/testdata/test_basic/initial/file1.copy4.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_basic/initial/file1.copy5.txt b/cmd/bisync/testdata/test_basic/initial/file1.copy5.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_basic/initial/file1.txt b/cmd/bisync/testdata/test_basic/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_basic/initial/subdir/file20.txt b/cmd/bisync/testdata/test_basic/initial/subdir/file20.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_basic/modfiles/file1.txt b/cmd/bisync/testdata/test_basic/modfiles/file1.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_basic/modfiles/file1.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_basic/scenario.txt b/cmd/bisync/testdata/test_basic/scenario.txt new file mode 100644 index 000000000..553a70564 --- /dev/null +++ b/cmd/bisync/testdata/test_basic/scenario.txt @@ -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 diff --git a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.copy1to2.que b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.copy1to2.que new file mode 100644 index 000000000..38a6601db --- /dev/null +++ b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.copy1to2.que @@ -0,0 +1,4 @@ +"file11.txt" +"file2.txt" +"file5.txt..path1" +"file7.txt" diff --git a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.copy2to1.que b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.copy2to1.que new file mode 100644 index 000000000..4146ce3e0 --- /dev/null +++ b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.copy2to1.que @@ -0,0 +1,4 @@ +"file1.txt" +"file10.txt" +"file5.txt..path2" +"file6.txt" diff --git a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.delete1.que b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.delete1.que new file mode 100644 index 000000000..8a5f92a1a --- /dev/null +++ b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.delete1.que @@ -0,0 +1 @@ +"file3.txt" diff --git a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.delete2.que b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.delete2.que new file mode 100644 index 000000000..3bf899b25 --- /dev/null +++ b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.delete2.que @@ -0,0 +1 @@ +"file4.txt" diff --git a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..49142c3e6 --- /dev/null +++ b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,10 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt..path1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt..path2" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..239afb58c --- /dev/null +++ b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,8 @@ +# 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.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..49142c3e6 --- /dev/null +++ b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,10 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt..path1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt..path2" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..377ac6a2a --- /dev/null +++ b/cmd/bisync/testdata/test_changes/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_changes/golden/test.log b/cmd/bisync/testdata/test_changes/golden/test.log new file mode 100644 index 000000000..1b314688d --- /dev/null +++ b/cmd/bisync/testdata/test_changes/golden/test.log @@ -0,0 +1,90 @@ +(01) : test changes + + +(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 make modifications on both paths +(05) : test new on path2 - file10 +(06) : touch-copy 2001-01-02 {datadir/}file10.txt {path2/} + +(07) : test newer on path2 - file1 +(08) : touch-copy 2001-01-02 {datadir/}file1.txt {path2/} + +(09) : test new on path1 - file11 +(10) : touch-copy 2001-01-02 {datadir/}file11.txt {path1/} + +(11) : test newer on path1 - file2 +(12) : touch-copy 2001-01-02 {datadir/}file2.txt {path1/} + +(13) : test deleted on path2 - file3 +(14) : delete-file {path2/}file3.txt + +(15) : test deleted on path1 - file4 +(16) : delete-file {path1/}file4.txt + +(17) : test deleted on both paths - file8 +(18) : delete-file {path1/}file8.txt +(19) : delete-file {path2/}file8.txt + +(20) : test changed on both paths - file5 (file5R, file5L) +(21) : touch-glob 2001-01-02 {datadir/} file5R.txt +(22) : copy-as {datadir/}file5R.txt {path2/} file5.txt +(23) : touch-glob 2001-03-04 {datadir/} file5L.txt +(24) : copy-as {datadir/}file5L.txt {path1/} file5.txt + +(25) : test newer on path2 and deleted on path1 - file6 +(26) : touch-copy 2001-01-02 {datadir/}file6.txt {path2/} +(27) : delete-file {path1/}file6.txt + +(28) : test newer on path1 and deleted on path2 - file7 +(29) : touch-copy 2001-01-02 {datadir/}file7.txt {path1/} +(30) : delete-file {path2/}file7.txt + +(31) : test bisync run +(32) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File is new - file11.txt +INFO : - Path1 File is newer - file2.txt +INFO : - Path1 File is newer - file5.txt +INFO : - Path1 File is newer - file7.txt +INFO : - Path1 File was deleted - file4.txt +INFO : - Path1 File was deleted - file6.txt +INFO : - Path1 File was deleted - file8.txt +INFO : Path1: 7 changes: 1 new, 3 newer, 0 older, 3 deleted +INFO : Path2 checking for diffs +INFO : - Path2 File is new - file10.txt +INFO : - Path2 File is newer - file1.txt +INFO : - Path2 File is newer - file5.txt +INFO : - Path2 File is newer - file6.txt +INFO : - Path2 File was deleted - file3.txt +INFO : - Path2 File was deleted - file7.txt +INFO : - Path2 File was deleted - file8.txt +INFO : Path2: 7 changes: 1 new, 3 newer, 0 older, 3 deleted +INFO : Applying changes +INFO : - Path1 Queue copy to Path2 - {path2/}file11.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file2.txt +INFO : - Path2 Queue delete - {path2/}file4.txt +NOTICE: - WARNING New or changed in both paths - file5.txt +NOTICE: - Path1 Renaming Path1 copy - {path1/}file5.txt..path1 +NOTICE: - Path1 Queue copy to Path2 - {path2/}file5.txt..path1 +NOTICE: - Path2 Renaming Path2 copy - {path2/}file5.txt..path2 +NOTICE: - Path2 Queue copy to Path1 - {path1/}file5.txt..path2 +INFO : - Path2 Queue copy to Path1 - {path1/}file6.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file7.txt +INFO : - Path2 Queue copy to Path1 - {path1/}file1.txt +INFO : - Path2 Queue copy to Path1 - {path1/}file10.txt +INFO : - Path1 Queue delete - {path1/}file3.txt +INFO : - Path2 Do queued copies to - Path1 +INFO : - Path1 Do queued copies to - Path2 +INFO : - Do queued deletes on - Path1 +INFO : - Do queued deletes on - Path2 +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful diff --git a/cmd/bisync/testdata/test_changes/initial/RCLONE_TEST b/cmd/bisync/testdata/test_changes/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_changes/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_changes/initial/file1.txt b/cmd/bisync/testdata/test_changes/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_changes/initial/file2.txt b/cmd/bisync/testdata/test_changes/initial/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_changes/initial/file3.txt b/cmd/bisync/testdata/test_changes/initial/file3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_changes/initial/file4.txt b/cmd/bisync/testdata/test_changes/initial/file4.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_changes/initial/file5.txt b/cmd/bisync/testdata/test_changes/initial/file5.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_changes/initial/file6.txt b/cmd/bisync/testdata/test_changes/initial/file6.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_changes/initial/file7.txt b/cmd/bisync/testdata/test_changes/initial/file7.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_changes/initial/file8.txt b/cmd/bisync/testdata/test_changes/initial/file8.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_changes/modfiles/file1.txt b/cmd/bisync/testdata/test_changes/modfiles/file1.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_changes/modfiles/file1.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_changes/modfiles/file10.txt b/cmd/bisync/testdata/test_changes/modfiles/file10.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_changes/modfiles/file10.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_changes/modfiles/file11.txt b/cmd/bisync/testdata/test_changes/modfiles/file11.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_changes/modfiles/file11.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_changes/modfiles/file2.txt b/cmd/bisync/testdata/test_changes/modfiles/file2.txt new file mode 100644 index 000000000..0fd70321a --- /dev/null +++ b/cmd/bisync/testdata/test_changes/modfiles/file2.txt @@ -0,0 +1 @@ +Newer version \ No newline at end of file diff --git a/cmd/bisync/testdata/test_changes/modfiles/file5L.txt b/cmd/bisync/testdata/test_changes/modfiles/file5L.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_changes/modfiles/file5L.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_changes/modfiles/file5R.txt b/cmd/bisync/testdata/test_changes/modfiles/file5R.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_changes/modfiles/file5R.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_changes/modfiles/file6.txt b/cmd/bisync/testdata/test_changes/modfiles/file6.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_changes/modfiles/file6.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_changes/modfiles/file7.txt b/cmd/bisync/testdata/test_changes/modfiles/file7.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_changes/modfiles/file7.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_changes/scenario.txt b/cmd/bisync/testdata/test_changes/scenario.txt new file mode 100644 index 000000000..cea3fcf22 --- /dev/null +++ b/cmd/bisync/testdata/test_changes/scenario.txt @@ -0,0 +1,55 @@ +test changes +# Exercise all of the various file change scenarios +# - New on Path2 file10 +# - Newer on Path2 file1 +# - New on Path1 file11 +# - Newer on Path1 file2 +# - Deleted on Path2 file3 +# - Deleted on Path1 file4 +# - Changed on Path2 and on Path1 file5 (file5r, file5l) +# - Newer on Path2 and deleted on Path1 file6 +# - Newer on Path1 and deleted on Path2 file7 +# - Deleted on both paths file8 + +test initial bisync +bisync resync + +test make modifications on both paths +test new on path2 - file10 +touch-copy 2001-01-02 {datadir/}file10.txt {path2/} + +test newer on path2 - file1 +touch-copy 2001-01-02 {datadir/}file1.txt {path2/} + +test new on path1 - file11 +touch-copy 2001-01-02 {datadir/}file11.txt {path1/} + +test newer on path1 - file2 +touch-copy 2001-01-02 {datadir/}file2.txt {path1/} + +test deleted on path2 - file3 +delete-file {path2/}file3.txt + +test deleted on path1 - file4 +delete-file {path1/}file4.txt + +test deleted on both paths - file8 +delete-file {path1/}file8.txt +delete-file {path2/}file8.txt + +test changed on both paths - file5 (file5R, file5L) +touch-glob 2001-01-02 {datadir/} file5R.txt +copy-as {datadir/}file5R.txt {path2/} file5.txt +touch-glob 2001-03-04 {datadir/} file5L.txt +copy-as {datadir/}file5L.txt {path1/} file5.txt + +test newer on path2 and deleted on path1 - file6 +touch-copy 2001-01-02 {datadir/}file6.txt {path2/} +delete-file {path1/}file6.txt + +test newer on path1 and deleted on path2 - file7 +touch-copy 2001-01-02 {datadir/}file7.txt {path1/} +delete-file {path2/}file7.txt + +test bisync run +bisync diff --git a/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..788d3f653 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,8 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..788d3f653 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,8 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..788d3f653 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,8 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..788d3f653 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,8 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.resync-copy2to1.que b/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.resync-copy2to1.que new file mode 100644 index 000000000..e042d885c --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/_testdir_path1.._testdir_path2.resync-copy2to1.que @@ -0,0 +1 @@ +"RCLONE_TEST" diff --git a/cmd/bisync/testdata/test_check_access/golden/missing-listings._testdir_path1.._testdir_path2.path1.lst-err b/cmd/bisync/testdata/test_check_access/golden/missing-listings._testdir_path1.._testdir_path2.path1.lst-err new file mode 100644 index 000000000..788d3f653 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/missing-listings._testdir_path1.._testdir_path2.path1.lst-err @@ -0,0 +1,8 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/missing-listings._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_access/golden/missing-listings._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..f228e0584 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/missing-listings._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,7 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/missing-listings._testdir_path1.._testdir_path2.path2.lst-err b/cmd/bisync/testdata/test_check_access/golden/missing-listings._testdir_path1.._testdir_path2.path2.lst-err new file mode 100644 index 000000000..788d3f653 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/missing-listings._testdir_path1.._testdir_path2.path2.lst-err @@ -0,0 +1,8 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/missing-listings._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_access/golden/missing-listings._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..788d3f653 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/missing-listings._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,8 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/path1-missing._testdir_path1.._testdir_path2.path1.lst-err b/cmd/bisync/testdata/test_check_access/golden/path1-missing._testdir_path1.._testdir_path2.path1.lst-err new file mode 100644 index 000000000..788d3f653 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/path1-missing._testdir_path1.._testdir_path2.path1.lst-err @@ -0,0 +1,8 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/path1-missing._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_access/golden/path1-missing._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..f228e0584 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/path1-missing._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,7 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/path1-missing._testdir_path1.._testdir_path2.path2.lst-err b/cmd/bisync/testdata/test_check_access/golden/path1-missing._testdir_path1.._testdir_path2.path2.lst-err new file mode 100644 index 000000000..788d3f653 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/path1-missing._testdir_path1.._testdir_path2.path2.lst-err @@ -0,0 +1,8 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/path1-missing._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_access/golden/path1-missing._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..788d3f653 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/path1-missing._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,8 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/path2-missing._testdir_path1.._testdir_path2.path1.lst-err b/cmd/bisync/testdata/test_check_access/golden/path2-missing._testdir_path1.._testdir_path2.path1.lst-err new file mode 100644 index 000000000..788d3f653 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/path2-missing._testdir_path1.._testdir_path2.path1.lst-err @@ -0,0 +1,8 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/path2-missing._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_access/golden/path2-missing._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..788d3f653 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/path2-missing._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,8 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/path2-missing._testdir_path1.._testdir_path2.path2.lst-err b/cmd/bisync/testdata/test_check_access/golden/path2-missing._testdir_path1.._testdir_path2.path2.lst-err new file mode 100644 index 000000000..788d3f653 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/path2-missing._testdir_path1.._testdir_path2.path2.lst-err @@ -0,0 +1,8 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/path2-missing._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_access/golden/path2-missing._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..f9e405f73 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/path2-missing._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,7 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_access/golden/test.log b/cmd/bisync/testdata/test_check_access/golden/test.log new file mode 100644 index 000000000..61d671649 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/golden/test.log @@ -0,0 +1,105 @@ +(01) : test check-access + + +(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 1. see that check-access passes with the initial setup +(05) : bisync check-access +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : Checking access health +INFO : Found 2 matching "RCLONE_TEST" files on both paths +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful + +(06) : test 2. delete the path2 subdir RCLONE_TEST and run sync. should fail critical. +(07) : delete-file {path2/}subdir/RCLONE_TEST +(08) : bisync check-access +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : - Path2 File was deleted - subdir/RCLONE_TEST +INFO : Path2: 1 changes: 0 new, 0 newer, 0 older, 1 deleted +INFO : Checking access health +ERROR : Access test failed: Path1 count 2, Path2 count 1 - RCLONE_TEST +ERROR : - Access test failed: Path1 file not found in Path2 - subdir/RCLONE_TEST +ERROR : Bisync critical error: check file check failed +ERROR : Bisync aborted. Must run --resync to recover. +Bisync error: bisync aborted +(09) : copy-listings path2-missing + +(10) : test 3. put the path2 subdir RCLONE_TEST back, resync. +(11) : copy-file {path1/}subdir/RCLONE_TEST {path2/} +(12) : 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 + +(13) : test 4. run sync with check-access. should pass. +(14) : bisync check-access +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : Checking access health +INFO : Found 2 matching "RCLONE_TEST" files on both paths +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful + +(15) : test 5. delete path1 top level RCLONE_TEST, run sync. should fail critical. +(16) : delete-file {path1/}RCLONE_TEST +(17) : bisync check-access +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File was deleted - RCLONE_TEST +INFO : Path1: 1 changes: 0 new, 0 newer, 0 older, 1 deleted +INFO : Path2 checking for diffs +INFO : Checking access health +ERROR : Access test failed: Path1 count 1, Path2 count 2 - RCLONE_TEST +ERROR : - Access test failed: Path2 file not found in Path1 - RCLONE_TEST +ERROR : Bisync critical error: check file check failed +ERROR : Bisync aborted. Must run --resync to recover. +Bisync error: bisync aborted +(18) : copy-listings path1-missing + +(19) : test 6. run again. should fail critical due to missing listings. +(20) : bisync check-access +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +ERROR : Bisync critical error: cannot find prior Path1 or Path2 listings, likely due to critical error on prior run +ERROR : Bisync aborted. Must run --resync to recover. +Bisync error: bisync aborted +(21) : move-listings missing-listings + +(22) : test 7. run resync, which will copy the path2 top level back to path1. +(23) : bisync resync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Copying unique Path2 files to Path1 +INFO : - Path2 Resync will copy to Path1 - RCLONE_TEST +INFO : - Path2 Resync is doing queued copies to - Path1 +INFO : Resynching Path1 to Path2 +INFO : Resync updating listings +INFO : Bisync successful + +(24) : test 8. run sync with --check-access. should pass. +(25) : bisync check-access +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : Checking access health +INFO : Found 2 matching "RCLONE_TEST" files on both paths +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful diff --git a/cmd/bisync/testdata/test_check_access/initial/RCLONE_TEST b/cmd/bisync/testdata/test_check_access/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_check_access/initial/file1.txt b/cmd/bisync/testdata/test_check_access/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access/initial/file2.txt b/cmd/bisync/testdata/test_check_access/initial/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access/initial/file3.txt b/cmd/bisync/testdata/test_check_access/initial/file3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access/initial/file4.txt b/cmd/bisync/testdata/test_check_access/initial/file4.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access/initial/subdir/RCLONE_TEST b/cmd/bisync/testdata/test_check_access/initial/subdir/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/initial/subdir/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_check_access/initial/subdir/file20.txt b/cmd/bisync/testdata/test_check_access/initial/subdir/file20.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access/modfiles/hold.txt b/cmd/bisync/testdata/test_check_access/modfiles/hold.txt new file mode 100644 index 000000000..a567f8bd4 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/modfiles/hold.txt @@ -0,0 +1 @@ +This file prevents bisync from deleting empty directories. diff --git a/cmd/bisync/testdata/test_check_access/scenario.txt b/cmd/bisync/testdata/test_check_access/scenario.txt new file mode 100644 index 000000000..3ef3189c7 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access/scenario.txt @@ -0,0 +1,44 @@ +test check-access +# RCLONE_TEST files in the top level and subdir +# +# 1. See that check-access passes with the initial setup. +# 2. Delete the Path2 subdir RCLONE_TEST, run sync. Should fail critical. +# 3. Put the Path2 subdir RCLONE_TEST back, resync. +# 4. Run sync with check-access. Should pass. +# 5. Delete Path1 top level RCLONE_TEST, run sync. Should fail critical. +# 6. Run again. Should fail critical due to missing listings. +# 7. Run resync, which will copy the Path2 top level back to Path1. +# 8. Run sync with check-access. Should pass. + +test initial bisync +bisync resync + +test 1. see that check-access passes with the initial setup +bisync check-access + +test 2. delete the path2 subdir RCLONE_TEST and run sync. should fail critical. +delete-file {path2/}subdir{/}RCLONE_TEST +bisync check-access +copy-listings path2-missing + +test 3. put the path2 subdir RCLONE_TEST back, resync. +copy-file {path1/}subdir/RCLONE_TEST {path2/} +bisync resync + +test 4. run sync with check-access. should pass. +bisync check-access + +test 5. delete path1 top level RCLONE_TEST, run sync. should fail critical. +delete-file {path1/}RCLONE_TEST +bisync check-access +copy-listings path1-missing + +test 6. run again. should fail critical due to missing listings. +bisync check-access +move-listings missing-listings + +test 7. run resync, which will copy the path2 top level back to path1. +bisync resync + +test 8. run sync with --check-access. should pass. +bisync check-access diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-error-run._testdir_path1.._testdir_path2.path1.lst-err b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-error-run._testdir_path1.._testdir_path2.path1.lst-err new file mode 100644 index 000000000..211bd4e31 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-error-run._testdir_path1.._testdir_path2.path1.lst-err @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-error-run._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-error-run._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..9296430cf --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-error-run._testdir_path1.._testdir_path2.path1.lst-new @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-error-run._testdir_path1.._testdir_path2.path2.lst-err b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-error-run._testdir_path1.._testdir_path2.path2.lst-err new file mode 100644 index 000000000..211bd4e31 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-error-run._testdir_path1.._testdir_path2.path2.lst-err @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-error-run._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-error-run._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..ca2ca1554 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-error-run._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,9 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-initial._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-initial._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..211bd4e31 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-initial._testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-initial._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-initial._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..211bd4e31 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-initial._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-initial._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-initial._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..211bd4e31 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-initial._testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-initial._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-initial._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..211bd4e31 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-initial._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-other-filtersfile.txt b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-other-filtersfile.txt new file mode 100644 index 000000000..18b83a070 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-other-filtersfile.txt @@ -0,0 +1,9 @@ +# EXCLUDE ALL Filters file for Check Access filtering testing + # another comment + # and another + + - /subdir/subdirA/ + + /subdir/** +- /subdir-not/ ++ /* +- ** diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-other-filtersfile.txt.md5 b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-other-filtersfile.txt.md5 new file mode 100644 index 000000000..407c05fe9 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-other-filtersfile.txt.md5 @@ -0,0 +1 @@ +868aeb20dc983cd1aaa29f6c4f2537e6 \ No newline at end of file diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-pass-run._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-pass-run._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..211bd4e31 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-pass-run._testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-pass-run._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-pass-run._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..211bd4e31 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-pass-run._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-pass-run._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-pass-run._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..211bd4e31 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-pass-run._testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/exclude-pass-run._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-pass-run._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..211bd4e31 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/exclude-pass-run._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-error-run._testdir_path1.._testdir_path2.path1.lst-err b/cmd/bisync/testdata/test_check_access_filters/golden/include-error-run._testdir_path1.._testdir_path2.path1.lst-err new file mode 100644 index 000000000..cbfc00336 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-error-run._testdir_path1.._testdir_path2.path1.lst-err @@ -0,0 +1,14 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-error-run._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_access_filters/golden/include-error-run._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..ef36ad44d --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-error-run._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,12 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/file20.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-error-run._testdir_path1.._testdir_path2.path2.lst-err b/cmd/bisync/testdata/test_check_access_filters/golden/include-error-run._testdir_path1.._testdir_path2.path2.lst-err new file mode 100644 index 000000000..cbfc00336 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-error-run._testdir_path1.._testdir_path2.path2.lst-err @@ -0,0 +1,14 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-error-run._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_access_filters/golden/include-error-run._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..1f169a9dd --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-error-run._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,13 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-initial._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_check_access_filters/golden/include-initial._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..cbfc00336 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-initial._testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,14 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-initial._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_access_filters/golden/include-initial._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..cbfc00336 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-initial._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,14 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-initial._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_check_access_filters/golden/include-initial._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..cbfc00336 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-initial._testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,14 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-initial._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_access_filters/golden/include-initial._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..cbfc00336 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-initial._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,14 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-other-filtersfile.txt b/cmd/bisync/testdata/test_check_access_filters/golden/include-other-filtersfile.txt new file mode 100644 index 000000000..8080e870a --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-other-filtersfile.txt @@ -0,0 +1,9 @@ +# INCLUDE OTHER Filters file for Check Access filtering testing + # another comment + # and another + + - /subdir/subdirA/ +# + /subdir/** +- /subdir-not/ +#+ /* +#- ** diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-other-filtersfile.txt.md5 b/cmd/bisync/testdata/test_check_access_filters/golden/include-other-filtersfile.txt.md5 new file mode 100644 index 000000000..c65db8b14 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-other-filtersfile.txt.md5 @@ -0,0 +1 @@ +b9c5205dddfc926160c2442b2497d407 \ No newline at end of file diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-pass-run._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_check_access_filters/golden/include-pass-run._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..cbfc00336 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-pass-run._testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,14 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-pass-run._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_access_filters/golden/include-pass-run._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..cbfc00336 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-pass-run._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,14 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-pass-run._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_check_access_filters/golden/include-pass-run._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..cbfc00336 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-pass-run._testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,14 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/include-pass-run._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_access_filters/golden/include-pass-run._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..cbfc00336 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/include-pass-run._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,14 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/subdirB/file30.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/file20.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdirX/subdirX1/file30.txt" diff --git a/cmd/bisync/testdata/test_check_access_filters/golden/test.log b/cmd/bisync/testdata/test_check_access_filters/golden/test.log new file mode 100644 index 000000000..b58a0e263 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/golden/test.log @@ -0,0 +1,144 @@ +(01) : test check-access-filters + + +(02) : test EXCLUDE - OTHER TESTS +(03) : copy-file {datadir/}exclude-other-filtersfile.txt {workdir/} + +(04) : test resync to get the filters file md5 built. +(05) : bisync resync filters-file={workdir/}exclude-other-filtersfile.txt +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}exclude-other-filtersfile.txt +INFO : Storing filters file hash to {workdir/}exclude-other-filtersfile.txt.md5 +INFO : Copying unique Path2 files to Path1 +INFO : Resynching Path1 to Path2 +INFO : Resync updating listings +INFO : Bisync successful + +(06) : test EXCLUDE - test filters for check access +(07) : bisync check-access filters-file={workdir/}exclude-other-filtersfile.txt +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}exclude-other-filtersfile.txt +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : Checking access health +INFO : Found 3 matching "RCLONE_TEST" files on both paths +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful +(08) : copy-listings exclude-initial + +(09) : test EXCLUDE - delete RCLONE_TEST files in excluded directories +(10) : delete-file {path2/}subdir/subdirA/RCLONE_TEST +(11) : delete-file {path1/}subdir-not/RCLONE_TEST +(12) : delete-file {path2/}subdir-not/subdir-not2/RCLONE_TEST +(13) : delete-file {path1/}subdirX/RCLONE_TEST + +(14) : test EXCLUDE - test should PASS +(15) : bisync check-access filters-file={workdir/}exclude-other-filtersfile.txt +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}exclude-other-filtersfile.txt +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : Checking access health +INFO : Found 3 matching "RCLONE_TEST" files on both paths +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful +(16) : copy-listings exclude-pass-run + +(17) : test EXCLUDE - delete RCLONE_TEST files in included directories +(18) : delete-file {path2/}RCLONE_TEST +(19) : delete-file {path1/}subdir/RCLONE_TEST + +(20) : test EXCLUDE - test should ABORT +(21) : bisync check-access filters-file={workdir/}exclude-other-filtersfile.txt +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}exclude-other-filtersfile.txt +INFO : Path1 checking for diffs +INFO : - Path1 File was deleted - subdir/RCLONE_TEST +INFO : Path1: 1 changes: 0 new, 0 newer, 0 older, 1 deleted +INFO : Path2 checking for diffs +INFO : - Path2 File was deleted - RCLONE_TEST +INFO : Path2: 1 changes: 0 new, 0 newer, 0 older, 1 deleted +INFO : Checking access health +ERROR : - Access test failed: Path1 file not found in Path2 - RCLONE_TEST +ERROR : - Access test failed: Path2 file not found in Path1 - subdir/RCLONE_TEST +ERROR : Bisync critical error: check file check failed +ERROR : Bisync aborted. Must run --resync to recover. +Bisync error: bisync aborted +(22) : move-listings exclude-error-run + +(23) : test INCLUDE - OTHER TESTS +(24) : test reset to the initial state +(25) : copy-dir {testdir/}initial {path1/} +(26) : sync-dir {path1/} {path2/} +(27) : copy-file {datadir/}include-other-filtersfile.txt {workdir/} +(28) : bisync resync filters-file={workdir/}include-other-filtersfile.txt +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}include-other-filtersfile.txt +INFO : Storing filters file hash to {workdir/}include-other-filtersfile.txt.md5 +INFO : Copying unique Path2 files to Path1 +INFO : Resynching Path1 to Path2 +INFO : Resync updating listings +INFO : Bisync successful + +(29) : test INCLUDE - test include/exclude filters for check access +(30) : bisync check-access filters-file={workdir/}include-other-filtersfile.txt +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}include-other-filtersfile.txt +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : Checking access health +INFO : Found 5 matching "RCLONE_TEST" files on both paths +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful +(31) : copy-listings include-initial + +(32) : test INCLUDE - delete RCLONE_TEST files in excluded directories +(33) : delete-file {path2/}subdir/subdirA/RCLONE_TEST +(34) : delete-file {path1/}subdir-not/RCLONE_TEST +(35) : delete-file {path2/}subdir-not/subdir-not2/RCLONE_TEST + +(36) : test INCLUDE - test should PASS +(37) : bisync check-access filters-file={workdir/}include-other-filtersfile.txt +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}include-other-filtersfile.txt +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : Checking access health +INFO : Found 5 matching "RCLONE_TEST" files on both paths +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful +(38) : copy-listings include-pass-run + +(39) : test INCLUDE - delete RCLONE_TEST files in included directories +(40) : delete-file {path2/}RCLONE_TEST +(41) : delete-file {path1/}subdir/RCLONE_TEST +(42) : delete-file {path1/}subdirX/subdirX1/RCLONE_TEST + +(43) : test INCLUDE - test should ABORT +(44) : bisync check-access filters-file={workdir/}include-other-filtersfile.txt +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}include-other-filtersfile.txt +INFO : Path1 checking for diffs +INFO : - Path1 File was deleted - subdir/RCLONE_TEST +INFO : - Path1 File was deleted - subdirX/subdirX1/RCLONE_TEST +INFO : Path1: 2 changes: 0 new, 0 newer, 0 older, 2 deleted +INFO : Path2 checking for diffs +INFO : - Path2 File was deleted - RCLONE_TEST +INFO : Path2: 1 changes: 0 new, 0 newer, 0 older, 1 deleted +INFO : Checking access health +ERROR : Access test failed: Path1 count 3, Path2 count 4 - RCLONE_TEST +ERROR : - Access test failed: Path1 file not found in Path2 - RCLONE_TEST +ERROR : - Access test failed: Path2 file not found in Path1 - subdir/RCLONE_TEST +ERROR : - Access test failed: Path2 file not found in Path1 - subdirX/subdirX1/RCLONE_TEST +ERROR : Bisync critical error: check file check failed +ERROR : Bisync aborted. Must run --resync to recover. +Bisync error: bisync aborted +(45) : move-listings include-error-run diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/RCLONE_TEST b/cmd/bisync/testdata/test_check_access_filters/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/file1.txt b/cmd/bisync/testdata/test_check_access_filters/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/file2.txt b/cmd/bisync/testdata/test_check_access_filters/initial/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/file3.txt b/cmd/bisync/testdata/test_check_access_filters/initial/file3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/file4.txt b/cmd/bisync/testdata/test_check_access_filters/initial/file4.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdir-not/RCLONE_TEST b/cmd/bisync/testdata/test_check_access_filters/initial/subdir-not/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/initial/subdir-not/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdir-not/file20.txt b/cmd/bisync/testdata/test_check_access_filters/initial/subdir-not/file20.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdir-not/subdir-not2/RCLONE_TEST b/cmd/bisync/testdata/test_check_access_filters/initial/subdir-not/subdir-not2/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/initial/subdir-not/subdir-not2/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdir-not/subdir-not2/file30.txt b/cmd/bisync/testdata/test_check_access_filters/initial/subdir-not/subdir-not2/file30.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdir/RCLONE_TEST b/cmd/bisync/testdata/test_check_access_filters/initial/subdir/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/initial/subdir/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdir/file20.txt b/cmd/bisync/testdata/test_check_access_filters/initial/subdir/file20.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdir/subdirA/RCLONE_TEST b/cmd/bisync/testdata/test_check_access_filters/initial/subdir/subdirA/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/initial/subdir/subdirA/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdir/subdirA/file30.txt b/cmd/bisync/testdata/test_check_access_filters/initial/subdir/subdirA/file30.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdir/subdirB/RCLONE_TEST b/cmd/bisync/testdata/test_check_access_filters/initial/subdir/subdirB/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/initial/subdir/subdirB/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdir/subdirB/file30.txt b/cmd/bisync/testdata/test_check_access_filters/initial/subdir/subdirB/file30.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdirX/RCLONE_TEST b/cmd/bisync/testdata/test_check_access_filters/initial/subdirX/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/initial/subdirX/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdirX/file20.txt b/cmd/bisync/testdata/test_check_access_filters/initial/subdirX/file20.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdirX/subdirX1/RCLONE_TEST b/cmd/bisync/testdata/test_check_access_filters/initial/subdirX/subdirX1/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/initial/subdirX/subdirX1/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_check_access_filters/initial/subdirX/subdirX1/file30.txt b/cmd/bisync/testdata/test_check_access_filters/initial/subdirX/subdirX1/file30.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_access_filters/modfiles/exclude-other-filtersfile.txt b/cmd/bisync/testdata/test_check_access_filters/modfiles/exclude-other-filtersfile.txt new file mode 100644 index 000000000..18b83a070 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/modfiles/exclude-other-filtersfile.txt @@ -0,0 +1,9 @@ +# EXCLUDE ALL Filters file for Check Access filtering testing + # another comment + # and another + + - /subdir/subdirA/ + + /subdir/** +- /subdir-not/ ++ /* +- ** diff --git a/cmd/bisync/testdata/test_check_access_filters/modfiles/include-other-filtersfile.txt b/cmd/bisync/testdata/test_check_access_filters/modfiles/include-other-filtersfile.txt new file mode 100644 index 000000000..8080e870a --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/modfiles/include-other-filtersfile.txt @@ -0,0 +1,9 @@ +# INCLUDE OTHER Filters file for Check Access filtering testing + # another comment + # and another + + - /subdir/subdirA/ +# + /subdir/** +- /subdir-not/ +#+ /* +#- ** diff --git a/cmd/bisync/testdata/test_check_access_filters/scenario.txt b/cmd/bisync/testdata/test_check_access_filters/scenario.txt new file mode 100644 index 000000000..46948a468 --- /dev/null +++ b/cmd/bisync/testdata/test_check_access_filters/scenario.txt @@ -0,0 +1,68 @@ +test check-access-filters +# Test Check Access construction of select/exclude filters for the RCLONE_TEST files. +# NOTE: Include Other tests may result in listing diffs due to rclone processing order change. False fail. +# +# Tests are done in two phases: +# - EXCLUDE OTHER tests check that RCLONE_TEST files are only found in the explicity included directories +# - INCLUDE OTHER tesss check that RCLONE_TEST files are found in all directories not explicity excluded +# +# Each phase checks that: +# - missing RCLONE_TEST files in don't care directories don't cause failures +# - missing RCLONE_TEST files in care directories do cause failures + +test EXCLUDE - OTHER TESTS +copy-file {datadir/}exclude-other-filtersfile.txt {workdir/} + +test resync to get the filters file md5 built. +bisync resync filters-file={workdir/}exclude-other-filtersfile.txt + +test EXCLUDE - test filters for check access +bisync check-access filters-file={workdir/}exclude-other-filtersfile.txt +copy-listings exclude-initial + +test EXCLUDE - delete RCLONE_TEST files in excluded directories +delete-file {path2/}subdir/subdirA/RCLONE_TEST +delete-file {path1/}subdir-not/RCLONE_TEST +delete-file {path2/}subdir-not/subdir-not2/RCLONE_TEST +delete-file {path1/}subdirX/RCLONE_TEST + +test EXCLUDE - test should PASS +bisync check-access filters-file={workdir/}exclude-other-filtersfile.txt +copy-listings exclude-pass-run + +test EXCLUDE - delete RCLONE_TEST files in included directories +delete-file {path2/}RCLONE_TEST +delete-file {path1/}subdir/RCLONE_TEST + +test EXCLUDE - test should ABORT +bisync check-access filters-file={workdir/}exclude-other-filtersfile.txt +move-listings exclude-error-run + +test INCLUDE - OTHER TESTS +test reset to the initial state +copy-dir {testdir/}initial {path1/} +sync-dir {path1/} {path2/} +copy-file {datadir/}include-other-filtersfile.txt {workdir/} +bisync resync filters-file={workdir/}include-other-filtersfile.txt + +test INCLUDE - test include/exclude filters for check access +bisync check-access filters-file={workdir/}include-other-filtersfile.txt +copy-listings include-initial + +test INCLUDE - delete RCLONE_TEST files in excluded directories +delete-file {path2/}subdir/subdirA/RCLONE_TEST +delete-file {path1/}subdir-not/RCLONE_TEST +delete-file {path2/}subdir-not/subdir-not2/RCLONE_TEST + +test INCLUDE - test should PASS +bisync check-access filters-file={workdir/}include-other-filtersfile.txt +copy-listings include-pass-run + +test INCLUDE - delete RCLONE_TEST files in included directories +delete-file {path2/}RCLONE_TEST +delete-file {path1/}subdir/RCLONE_TEST +delete-file {path1/}subdirX/subdirX1/RCLONE_TEST + +test INCLUDE - test should ABORT +bisync check-access filters-file={workdir/}include-other-filtersfile.txt +move-listings include-error-run diff --git a/cmd/bisync/testdata/test_check_filename/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_check_filename/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..d9b82dd1c --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 ".chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/.chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_filename/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_filename/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..d9b82dd1c --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 ".chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/.chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_filename/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_check_filename/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..d9b82dd1c --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 ".chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/.chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_filename/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_filename/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..d9b82dd1c --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 ".chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/.chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_filename/golden/initial-pass._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_check_filename/golden/initial-pass._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..d9b82dd1c --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/golden/initial-pass._testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 ".chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/.chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_filename/golden/initial-pass._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_filename/golden/initial-pass._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..d9b82dd1c --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/golden/initial-pass._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 ".chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/.chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_filename/golden/initial-pass._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_check_filename/golden/initial-pass._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..d9b82dd1c --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/golden/initial-pass._testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 ".chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/.chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_filename/golden/initial-pass._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_filename/golden/initial-pass._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..d9b82dd1c --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/golden/initial-pass._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 ".chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/.chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_filename/golden/path2-missing._testdir_path1.._testdir_path2.path1.lst-err b/cmd/bisync/testdata/test_check_filename/golden/path2-missing._testdir_path1.._testdir_path2.path1.lst-err new file mode 100644 index 000000000..d9b82dd1c --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/golden/path2-missing._testdir_path1.._testdir_path2.path1.lst-err @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 ".chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/.chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_filename/golden/path2-missing._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_filename/golden/path2-missing._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..d9b82dd1c --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/golden/path2-missing._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 ".chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/.chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_filename/golden/path2-missing._testdir_path1.._testdir_path2.path2.lst-err b/cmd/bisync/testdata/test_check_filename/golden/path2-missing._testdir_path1.._testdir_path2.path2.lst-err new file mode 100644 index 000000000..d9b82dd1c --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/golden/path2-missing._testdir_path1.._testdir_path2.path2.lst-err @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 ".chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "subdir/.chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_filename/golden/path2-missing._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_filename/golden/path2-missing._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..dc9d9664d --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/golden/path2-missing._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,7 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 ".chk_file" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_check_filename/golden/test.log b/cmd/bisync/testdata/test_check_filename/golden/test.log new file mode 100644 index 000000000..78d0555ac --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/golden/test.log @@ -0,0 +1,60 @@ +(01) : test check-filename + + +(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 1. see that check-access passes with the initial setup +(05) : bisync check-access check-filename=.chk_file +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : Checking access health +INFO : Found 2 matching ".chk_file" files on both paths +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful +(06) : copy-listings initial-pass + +(07) : test 2. delete the remote subdir .chk_file, run sync. should fail critical. +(08) : delete-file {path2/}subdir/.chk_file +(09) : bisync check-access check-filename=.chk_file +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : - Path2 File was deleted - subdir/.chk_file +INFO : Path2: 1 changes: 0 new, 0 newer, 0 older, 1 deleted +INFO : Checking access health +ERROR : Access test failed: Path1 count 2, Path2 count 1 - .chk_file +ERROR : - Access test failed: Path1 file not found in Path2 - subdir/.chk_file +ERROR : Bisync critical error: check file check failed +ERROR : Bisync aborted. Must run --resync to recover. +Bisync error: bisync aborted +(10) : move-listings path2-missing + +(11) : test 3. put the remote subdir .chk_file back, run resync. +(12) : copy-file {path1/}subdir/.chk_file {path2/} +(13) : bisync check-access resync check-filename=.chk_file +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 + +(14) : test 4. run sync with check-access. should pass. +(15) : bisync check-access check-filename=.chk_file +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : Checking access health +INFO : Found 2 matching ".chk_file" files on both paths +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful diff --git a/cmd/bisync/testdata/test_check_filename/initial/.chk_file b/cmd/bisync/testdata/test_check_filename/initial/.chk_file new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/initial/.chk_file @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_check_filename/initial/file1.txt b/cmd/bisync/testdata/test_check_filename/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_filename/initial/file2.txt b/cmd/bisync/testdata/test_check_filename/initial/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_filename/initial/file3.txt b/cmd/bisync/testdata/test_check_filename/initial/file3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_filename/initial/file4.txt b/cmd/bisync/testdata/test_check_filename/initial/file4.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_filename/initial/subdir/.chk_file b/cmd/bisync/testdata/test_check_filename/initial/subdir/.chk_file new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/initial/subdir/.chk_file @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_check_filename/initial/subdir/file20.txt b/cmd/bisync/testdata/test_check_filename/initial/subdir/file20.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_filename/modfiles/hold.txt b/cmd/bisync/testdata/test_check_filename/modfiles/hold.txt new file mode 100644 index 000000000..a567f8bd4 --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/modfiles/hold.txt @@ -0,0 +1 @@ +This file prevents bisync from deleting empty directories. diff --git a/cmd/bisync/testdata/test_check_filename/scenario.txt b/cmd/bisync/testdata/test_check_filename/scenario.txt new file mode 100644 index 000000000..3d0b0ab49 --- /dev/null +++ b/cmd/bisync/testdata/test_check_filename/scenario.txt @@ -0,0 +1,27 @@ +test check-filename +# Test for --check-filename=.chk_file +# The test check-access is a more complete test of the check-access logic. +# +# 1. See that --check-access passes with the initial setup. +# 2. Delete the remote subdir .chk_file, run sync. Should fail critical. +# 3. Put the remote subdir .chk_file back, run resync. +# 4. Run sync with check-access. Should pass. + +test initial bisync +bisync resync + +test 1. see that check-access passes with the initial setup +bisync check-access check-filename=.chk_file +copy-listings initial-pass + +test 2. delete the remote subdir .chk_file, run sync. should fail critical. +delete-file {path2/}subdir/.chk_file +bisync check-access check-filename=.chk_file +move-listings path2-missing + +test 3. put the remote subdir .chk_file back, run resync. +copy-file {path1/}subdir/.chk_file {path2/} +bisync check-access resync check-filename=.chk_file + +test 4. run sync with check-access. should pass. +bisync check-access check-filename=.chk_file diff --git a/cmd/bisync/testdata/test_check_sync/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_check_sync/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..6af4a00fa --- /dev/null +++ b/cmd/bisync/testdata/test_check_sync/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" diff --git a/cmd/bisync/testdata/test_check_sync/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_sync/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..6af4a00fa --- /dev/null +++ b/cmd/bisync/testdata/test_check_sync/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" diff --git a/cmd/bisync/testdata/test_check_sync/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_check_sync/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..6af4a00fa --- /dev/null +++ b/cmd/bisync/testdata/test_check_sync/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" diff --git a/cmd/bisync/testdata/test_check_sync/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_sync/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..6af4a00fa --- /dev/null +++ b/cmd/bisync/testdata/test_check_sync/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" diff --git a/cmd/bisync/testdata/test_check_sync/golden/check-sync-only._testdir_path1.._testdir_path2.path1.lst-err b/cmd/bisync/testdata/test_check_sync/golden/check-sync-only._testdir_path1.._testdir_path2.path1.lst-err new file mode 100644 index 000000000..1146bfd0c --- /dev/null +++ b/cmd/bisync/testdata/test_check_sync/golden/check-sync-only._testdir_path1.._testdir_path2.path1.lst-err @@ -0,0 +1,8 @@ +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt_Path1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt_Path2" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_check_sync/golden/check-sync-only._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_check_sync/golden/check-sync-only._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..6af4a00fa --- /dev/null +++ b/cmd/bisync/testdata/test_check_sync/golden/check-sync-only._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" diff --git a/cmd/bisync/testdata/test_check_sync/golden/check-sync-only._testdir_path1.._testdir_path2.path2.lst-err b/cmd/bisync/testdata/test_check_sync/golden/check-sync-only._testdir_path1.._testdir_path2.path2.lst-err new file mode 100644 index 000000000..ab7959ded --- /dev/null +++ b/cmd/bisync/testdata/test_check_sync/golden/check-sync-only._testdir_path1.._testdir_path2.path2.lst-err @@ -0,0 +1,8 @@ +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt_Path1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt_Path2" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_check_sync/golden/check-sync-only._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_check_sync/golden/check-sync-only._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..6af4a00fa --- /dev/null +++ b/cmd/bisync/testdata/test_check_sync/golden/check-sync-only._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" diff --git a/cmd/bisync/testdata/test_check_sync/golden/test.log b/cmd/bisync/testdata/test_check_sync/golden/test.log new file mode 100644 index 000000000..8984a8b81 --- /dev/null +++ b/cmd/bisync/testdata/test_check_sync/golden/test.log @@ -0,0 +1,68 @@ +(01) : test check-sync + + +(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 1. run check-sync-only on a clean sync +(05) : bisync check-sync-only +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful + +(06) : test 2. inject modified listings into the workdir +(07) : copy-as {datadir/}_testdir_path1.._testdir_path2.path1.lst {workdir/} {session}.path1.lst +(08) : copy-as {datadir/}_testdir_path1.._testdir_path2.path2.lst {workdir/} {session}.path2.lst + +(09) : test 3. run check-sync-only on modified listings +(10) : bisync check-sync-only +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +ERROR : - Path1 file not found in Path2 - file2.txt +ERROR : - Path2 file not found in Path1 - file1.txt +ERROR : Bisync critical error: path1 and path2 are out of sync, run --resync to recover +ERROR : Bisync aborted. Must run --resync to recover. +Bisync error: bisync aborted +(11) : copy-listings check-sync-only + +(12) : test 4. run normal sync to check that it aborts +(13) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +ERROR : Bisync critical error: cannot find prior Path1 or Path2 listings, likely due to critical error on prior run +ERROR : Bisync aborted. Must run --resync to recover. +Bisync error: bisync aborted + +(14) : test 5. prune failure listings after critical abort +(15) : delete-glob {workdir/} *.lst +(16) : delete-glob {workdir/} *.lst-err +(17) : delete-glob {workdir/} *.lst-new + +(18) : test 6. run resync +(19) : 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 + +(20) : test 7. run normal sync with check-sync enabled (default) +(21) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful + +(22) : test 8. run normal sync with no-check-sync +(23) : bisync no-check-sync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : No changes found +INFO : Updating listings +INFO : Bisync successful diff --git a/cmd/bisync/testdata/test_check_sync/initial/RCLONE_TEST b/cmd/bisync/testdata/test_check_sync/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_check_sync/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_check_sync/initial/file1.txt b/cmd/bisync/testdata/test_check_sync/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_sync/initial/file2.txt b/cmd/bisync/testdata/test_check_sync/initial/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_sync/initial/file3.txt b/cmd/bisync/testdata/test_check_sync/initial/file3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_sync/initial/file4.txt b/cmd/bisync/testdata/test_check_sync/initial/file4.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_sync/initial/file5.txt b/cmd/bisync/testdata/test_check_sync/initial/file5.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_sync/initial/file6.txt b/cmd/bisync/testdata/test_check_sync/initial/file6.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_sync/initial/file7.txt b/cmd/bisync/testdata/test_check_sync/initial/file7.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_sync/initial/file8.txt b/cmd/bisync/testdata/test_check_sync/initial/file8.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_check_sync/modfiles/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_check_sync/modfiles/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..1146bfd0c --- /dev/null +++ b/cmd/bisync/testdata/test_check_sync/modfiles/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,8 @@ +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt_Path1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt_Path2" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_check_sync/modfiles/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_check_sync/modfiles/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..ab7959ded --- /dev/null +++ b/cmd/bisync/testdata/test_check_sync/modfiles/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,8 @@ +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt_Path1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt_Path2" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_check_sync/scenario.txt b/cmd/bisync/testdata/test_check_sync/scenario.txt new file mode 100644 index 000000000..dd97daba8 --- /dev/null +++ b/cmd/bisync/testdata/test_check_sync/scenario.txt @@ -0,0 +1,42 @@ +test check-sync +# Exercise listing integrity checks +# +# 1. Run check-sync-only on a clean sync +# 2. Copy modified listings into the workdir +# 3. Run check-sync-only on modified listings +# 4. Run normal sync to check that it critical aborts +# 5. Prune failure listings after critical abort +# 6. Run resync +# 7. Run normal sync with check-sync enabled (default) +# 8. Run normal sync with no-check-sync + +test initial bisync +bisync resync + +test 1. run check-sync-only on a clean sync +bisync check-sync-only + +test 2. inject modified listings into the workdir +copy-as {datadir/}_testdir_path1.._testdir_path2.path1.lst {workdir/} {session}.path1.lst +copy-as {datadir/}_testdir_path1.._testdir_path2.path2.lst {workdir/} {session}.path2.lst + +test 3. run check-sync-only on modified listings +bisync check-sync-only +copy-listings check-sync-only + +test 4. run normal sync to check that it aborts +bisync + +test 5. prune failure listings after critical abort +delete-glob {workdir/} *.lst +delete-glob {workdir/} *.lst-err +delete-glob {workdir/} *.lst-new + +test 6. run resync +bisync resync + +test 7. run normal sync with check-sync enabled (default) +bisync + +test 8. run normal sync with no-check-sync +bisync no-check-sync diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.copy1to2.que b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.copy1to2.que new file mode 100644 index 000000000..38a6601db --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.copy1to2.que @@ -0,0 +1,4 @@ +"file11.txt" +"file2.txt" +"file5.txt..path1" +"file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.copy2to1.que b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.copy2to1.que new file mode 100644 index 000000000..4146ce3e0 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.copy2to1.que @@ -0,0 +1,4 @@ +"file1.txt" +"file10.txt" +"file5.txt..path2" +"file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.delete1.que b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.delete1.que new file mode 100644 index 000000000..8a5f92a1a --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.delete1.que @@ -0,0 +1 @@ +"file3.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.delete2.que b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.delete2.que new file mode 100644 index 000000000..3bf899b25 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.delete2.que @@ -0,0 +1 @@ +"file4.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..49142c3e6 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,10 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt..path1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt..path2" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry new file mode 100644 index 000000000..239afb58c --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry @@ -0,0 +1,8 @@ +# 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.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry-new b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry-new new file mode 100644 index 000000000..239afb58c --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-dry-new @@ -0,0 +1,8 @@ +# 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.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..239afb58c --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,8 @@ +# 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.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..49142c3e6 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,10 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt..path1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt..path2" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry new file mode 100644 index 000000000..377ac6a2a --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry-new b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry-new new file mode 100644 index 000000000..377ac6a2a --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-dry-new @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..377ac6a2a --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.resync-copy2to1.que b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.resync-copy2to1.que new file mode 100644 index 000000000..53d435fb9 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/_testdir_path1.._testdir_path2.resync-copy2to1.que @@ -0,0 +1,3 @@ +"file10.txt" +"file4.txt" +"file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry new file mode 100644 index 000000000..239afb58c --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry @@ -0,0 +1,8 @@ +# 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.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry-new b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry-new new file mode 100644 index 000000000..239afb58c --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-dry-new @@ -0,0 +1,8 @@ +# 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.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path1.lst-new @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry new file mode 100644 index 000000000..377ac6a2a --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry-new b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry-new new file mode 100644 index 000000000..377ac6a2a --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-dry-new @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.path2.lst-new @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.resync-copy2to1.que b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.resync-copy2to1.que new file mode 100644 index 000000000..53d435fb9 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun-resync._testdir_path1.._testdir_path2.resync-copy2to1.que @@ -0,0 +1,3 @@ +"file10.txt" +"file4.txt" +"file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.copy1to2.que b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.copy1to2.que new file mode 100644 index 000000000..38a6601db --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.copy1to2.que @@ -0,0 +1,4 @@ +"file11.txt" +"file2.txt" +"file5.txt..path1" +"file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.copy2to1.que b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.copy2to1.que new file mode 100644 index 000000000..4146ce3e0 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.copy2to1.que @@ -0,0 +1,4 @@ +"file1.txt" +"file10.txt" +"file5.txt..path2" +"file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.delete1.que b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.delete1.que new file mode 100644 index 000000000..8a5f92a1a --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.delete1.que @@ -0,0 +1 @@ +"file3.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.delete2.que b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.delete2.que new file mode 100644 index 000000000..3bf899b25 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.delete2.que @@ -0,0 +1 @@ +"file4.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry new file mode 100644 index 000000000..239afb58c --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry @@ -0,0 +1,8 @@ +# 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.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry-new b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry-new new file mode 100644 index 000000000..239afb58c --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-dry-new @@ -0,0 +1,8 @@ +# 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.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file11.txt" +- 13 md5:fb3ecfb2800400fb01b0bfd39903e9fb - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-03-04T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path1.lst-new @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry new file mode 100644 index 000000000..377ac6a2a --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry-new b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry-new new file mode 100644 index 000000000..377ac6a2a --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-dry-new @@ -0,0 +1,8 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file10.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.path2.lst-new @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.resync-copy2to1.que b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.resync-copy2to1.que new file mode 100644 index 000000000..53d435fb9 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/dryrun._testdir_path1.._testdir_path2.resync-copy2to1.que @@ -0,0 +1,3 @@ +"file10.txt" +"file4.txt" +"file6.txt" diff --git a/cmd/bisync/testdata/test_dry_run/golden/test.log b/cmd/bisync/testdata/test_dry_run/golden/test.log new file mode 100644 index 000000000..2efdb1f81 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/golden/test.log @@ -0,0 +1,159 @@ +(01) : test dry-run + + +(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 new on path2 - file10 +(05) : touch-copy 2001-01-02 {datadir/}file10.txt {path2/} + +(06) : test newer on path2 - file1 +(07) : touch-copy 2001-01-02 {datadir/}file1.txt {path2/} + +(08) : test new on path1 - file11 +(09) : touch-copy 2001-01-02 {datadir/}file11.txt {path1/} + +(10) : test newer on path1 - file2 +(11) : touch-copy 2001-01-02 {datadir/}file2.txt {path1/} + +(12) : test deleted on path2 - file3 +(13) : delete-file {path2/}file3.txt + +(14) : test deleted on path1 - file4 +(15) : delete-file {path1/}file4.txt + +(16) : test changed on path2 and on path1 - file5 (file5R, file5L) +(17) : touch-glob 2001-01-02 {datadir/} file5R.txt +(18) : copy-as {datadir/}file5R.txt {path2/} file5.txt +(19) : touch-glob 2001-03-04 {datadir/} file5L.txt +(20) : copy-as {datadir/}file5L.txt {path1/} file5.txt + +(21) : test newer on path2 and deleted on path1 - file6 +(22) : touch-copy 2001-01-02 {datadir/}file6.txt {path2/} +(23) : delete-file {path1/}file6.txt + +(24) : test newer on path1 and deleted on path2 - file7 +(25) : touch-copy 2001-01-02 {datadir/}file7.txt {path1/} +(26) : delete-file {path2/}file7.txt + +(27) : test sync with dry-run and resync +(28) : bisync dry-run resync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Copying unique Path2 files to Path1 +INFO : - Path2 Resync will copy to Path1 - file10.txt +INFO : - Path2 Resync will copy to Path1 - file4.txt +INFO : - Path2 Resync will copy to Path1 - file6.txt +INFO : - Path2 Resync is doing queued copies to - Path1 +NOTICE: file10.txt: Skipped copy as --dry-run is set (size 19) +NOTICE: file4.txt: Skipped copy as --dry-run is set (size 0) +NOTICE: file6.txt: Skipped copy as --dry-run is set (size 19) +INFO : Resynching Path1 to Path2 +NOTICE: file1.txt: Skipped copy as --dry-run is set (size 0) +NOTICE: file10.txt: Skipped delete as --dry-run is set (size 19) +NOTICE: file11.txt: Skipped copy as --dry-run is set (size 19) +NOTICE: file2.txt: Skipped copy as --dry-run is set (size 13) +NOTICE: file3.txt: Skipped copy as --dry-run is set (size 0) +NOTICE: file4.txt: Skipped delete as --dry-run is set (size 0) +NOTICE: file5.txt: Skipped copy (or update modification time) as --dry-run is set (size 19) +NOTICE: file6.txt: Skipped delete as --dry-run is set (size 19) +NOTICE: file7.txt: Skipped copy as --dry-run is set (size 19) +INFO : Resync updating listings +INFO : Bisync successful +(29) : copy-listings dryrun-resync + +(30) : test sync with dry-run +(31) : bisync dry-run +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File is new - file11.txt +INFO : - Path1 File is newer - file2.txt +INFO : - Path1 File is newer - file5.txt +INFO : - Path1 File is newer - file7.txt +INFO : - Path1 File was deleted - file4.txt +INFO : - Path1 File was deleted - file6.txt +INFO : Path1: 6 changes: 1 new, 3 newer, 0 older, 2 deleted +INFO : Path2 checking for diffs +INFO : - Path2 File is new - file10.txt +INFO : - Path2 File is newer - file1.txt +INFO : - Path2 File is newer - file5.txt +INFO : - Path2 File is newer - file6.txt +INFO : - Path2 File was deleted - file3.txt +INFO : - Path2 File was deleted - file7.txt +INFO : Path2: 6 changes: 1 new, 3 newer, 0 older, 2 deleted +INFO : Applying changes +INFO : - Path1 Queue copy to Path2 - {path2/}file11.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file2.txt +INFO : - Path2 Queue delete - {path2/}file4.txt +NOTICE: - WARNING New or changed in both paths - file5.txt +NOTICE: - Path1 Renaming Path1 copy - {path1/}file5.txt..path1 +NOTICE: file5.txt: Skipped move as --dry-run is set (size 19) +NOTICE: - Path1 Queue copy to Path2 - {path2/}file5.txt..path1 +NOTICE: - Path2 Renaming Path2 copy - {path2/}file5.txt..path2 +NOTICE: file5.txt: Skipped move as --dry-run is set (size 19) +NOTICE: - Path2 Queue copy to Path1 - {path1/}file5.txt..path2 +INFO : - Path2 Queue copy to Path1 - {path1/}file6.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file7.txt +INFO : - Path2 Queue copy to Path1 - {path1/}file1.txt +INFO : - Path2 Queue copy to Path1 - {path1/}file10.txt +INFO : - Path1 Queue delete - {path1/}file3.txt +INFO : - Path2 Do queued copies to - Path1 +NOTICE: file1.txt: Skipped copy as --dry-run is set (size 19) +NOTICE: file10.txt: Skipped copy as --dry-run is set (size 19) +NOTICE: file6.txt: Skipped copy as --dry-run is set (size 19) +INFO : - Path1 Do queued copies to - Path2 +NOTICE: file11.txt: Skipped copy as --dry-run is set (size 19) +NOTICE: file2.txt: Skipped copy as --dry-run is set (size 13) +NOTICE: file7.txt: Skipped copy as --dry-run is set (size 19) +INFO : - Do queued deletes on - Path1 +NOTICE: file3.txt: Skipped delete as --dry-run is set (size 0) +INFO : - Do queued deletes on - Path2 +NOTICE: file4.txt: Skipped delete as --dry-run is set (size 0) +INFO : Updating listings +INFO : Bisync successful +(32) : copy-listings dryrun + +(33) : test sync without dry-run +(34) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File is new - file11.txt +INFO : - Path1 File is newer - file2.txt +INFO : - Path1 File is newer - file5.txt +INFO : - Path1 File is newer - file7.txt +INFO : - Path1 File was deleted - file4.txt +INFO : - Path1 File was deleted - file6.txt +INFO : Path1: 6 changes: 1 new, 3 newer, 0 older, 2 deleted +INFO : Path2 checking for diffs +INFO : - Path2 File is new - file10.txt +INFO : - Path2 File is newer - file1.txt +INFO : - Path2 File is newer - file5.txt +INFO : - Path2 File is newer - file6.txt +INFO : - Path2 File was deleted - file3.txt +INFO : - Path2 File was deleted - file7.txt +INFO : Path2: 6 changes: 1 new, 3 newer, 0 older, 2 deleted +INFO : Applying changes +INFO : - Path1 Queue copy to Path2 - {path2/}file11.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file2.txt +INFO : - Path2 Queue delete - {path2/}file4.txt +NOTICE: - WARNING New or changed in both paths - file5.txt +NOTICE: - Path1 Renaming Path1 copy - {path1/}file5.txt..path1 +NOTICE: - Path1 Queue copy to Path2 - {path2/}file5.txt..path1 +NOTICE: - Path2 Renaming Path2 copy - {path2/}file5.txt..path2 +NOTICE: - Path2 Queue copy to Path1 - {path1/}file5.txt..path2 +INFO : - Path2 Queue copy to Path1 - {path1/}file6.txt +INFO : - Path1 Queue copy to Path2 - {path2/}file7.txt +INFO : - Path2 Queue copy to Path1 - {path1/}file1.txt +INFO : - Path2 Queue copy to Path1 - {path1/}file10.txt +INFO : - Path1 Queue delete - {path1/}file3.txt +INFO : - Path2 Do queued copies to - Path1 +INFO : - Path1 Do queued copies to - Path2 +INFO : - Do queued deletes on - Path1 +INFO : - Do queued deletes on - Path2 +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful diff --git a/cmd/bisync/testdata/test_dry_run/initial/RCLONE_TEST b/cmd/bisync/testdata/test_dry_run/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_dry_run/initial/file1.txt b/cmd/bisync/testdata/test_dry_run/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_dry_run/initial/file2.txt b/cmd/bisync/testdata/test_dry_run/initial/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_dry_run/initial/file3.txt b/cmd/bisync/testdata/test_dry_run/initial/file3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_dry_run/initial/file4.txt b/cmd/bisync/testdata/test_dry_run/initial/file4.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_dry_run/initial/file5.txt b/cmd/bisync/testdata/test_dry_run/initial/file5.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_dry_run/initial/file6.txt b/cmd/bisync/testdata/test_dry_run/initial/file6.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_dry_run/initial/file7.txt b/cmd/bisync/testdata/test_dry_run/initial/file7.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_dry_run/modfiles/file1.txt b/cmd/bisync/testdata/test_dry_run/modfiles/file1.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/modfiles/file1.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_dry_run/modfiles/file10.txt b/cmd/bisync/testdata/test_dry_run/modfiles/file10.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/modfiles/file10.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_dry_run/modfiles/file11.txt b/cmd/bisync/testdata/test_dry_run/modfiles/file11.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/modfiles/file11.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_dry_run/modfiles/file2.txt b/cmd/bisync/testdata/test_dry_run/modfiles/file2.txt new file mode 100644 index 000000000..0fd70321a --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/modfiles/file2.txt @@ -0,0 +1 @@ +Newer version \ No newline at end of file diff --git a/cmd/bisync/testdata/test_dry_run/modfiles/file5L.txt b/cmd/bisync/testdata/test_dry_run/modfiles/file5L.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/modfiles/file5L.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_dry_run/modfiles/file5R.txt b/cmd/bisync/testdata/test_dry_run/modfiles/file5R.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/modfiles/file5R.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_dry_run/modfiles/file6.txt b/cmd/bisync/testdata/test_dry_run/modfiles/file6.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/modfiles/file6.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_dry_run/modfiles/file7.txt b/cmd/bisync/testdata/test_dry_run/modfiles/file7.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/modfiles/file7.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_dry_run/scenario.txt b/cmd/bisync/testdata/test_dry_run/scenario.txt new file mode 100644 index 000000000..568158e3d --- /dev/null +++ b/cmd/bisync/testdata/test_dry_run/scenario.txt @@ -0,0 +1,59 @@ +test dry-run +# Two bisync runs, first with dry-run. +# +# Derived from test_changes: +# - New on Path2 file10 +# - Newer on Path2 file1 +# - New on Path1 file11 +# - Newer on Path1 file2 +# - Deleted on Path2 file3 +# - Deleted on Path1 file4 +# - Changed on Path2 and on Path1 file5 (file5r, file5l) +# - Newer on Path2 and deleted on Path1 file6 +# - Newer on Path1 and deleted on Path2 file7 + +test initial bisync +bisync resync + +test new on path2 - file10 +touch-copy 2001-01-02 {datadir/}file10.txt {path2/} + +test newer on path2 - file1 +touch-copy 2001-01-02 {datadir/}file1.txt {path2/} + +test new on path1 - file11 +touch-copy 2001-01-02 {datadir/}file11.txt {path1/} + +test newer on path1 - file2 +touch-copy 2001-01-02 {datadir/}file2.txt {path1/} + +test deleted on path2 - file3 +delete-file {path2/}file3.txt + +test deleted on path1 - file4 +delete-file {path1/}file4.txt + +test changed on path2 and on path1 - file5 (file5R, file5L) +touch-glob 2001-01-02 {datadir/} file5R.txt +copy-as {datadir/}file5R.txt {path2/} file5.txt +touch-glob 2001-03-04 {datadir/} file5L.txt +copy-as {datadir/}file5L.txt {path1/} file5.txt + +test newer on path2 and deleted on path1 - file6 +touch-copy 2001-01-02 {datadir/}file6.txt {path2/} +delete-file {path1/}file6.txt + +test newer on path1 and deleted on path2 - file7 +touch-copy 2001-01-02 {datadir/}file7.txt {path1/} +delete-file {path2/}file7.txt + +test sync with dry-run and resync +bisync dry-run resync +copy-listings dryrun-resync + +test sync with dry-run +bisync dry-run +copy-listings dryrun + +test sync without dry-run +bisync diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_extended_char_paths/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..577a33802 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,13 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_extended_char_paths/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..577a33802 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,13 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_extended_char_paths/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..577a33802 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,13 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_extended_char_paths/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..577a33802 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,13 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-fail._testdir_path1.._testdir_path2.path1.lst-err b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-fail._testdir_path1.._testdir_path2.path1.lst-err new file mode 100644 index 000000000..577a33802 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-fail._testdir_path1.._testdir_path2.path1.lst-err @@ -0,0 +1,13 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-fail._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-fail._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..fe0dc6daf --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-fail._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,12 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-fail._testdir_path1.._testdir_path2.path2.lst-err b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-fail._testdir_path1.._testdir_path2.path2.lst-err new file mode 100644 index 000000000..577a33802 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-fail._testdir_path1.._testdir_path2.path2.lst-err @@ -0,0 +1,13 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-fail._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-fail._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..577a33802 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-fail._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,13 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..577a33802 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,13 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path1.lst-err b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path1.lst-err new file mode 100644 index 000000000..577a33802 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path1.lst-err @@ -0,0 +1,13 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..577a33802 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,13 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..577a33802 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,13 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path2.lst-err b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path2.lst-err new file mode 100644 index 000000000..577a33802 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path2.lst-err @@ -0,0 +1,13 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..577a33802 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,13 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "РуÑÑкий.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.resync-copy2to1.que b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.resync-copy2to1.que new file mode 100644 index 000000000..7a6560a8a --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/check-access-pass._testdir_path1.._testdir_path2.resync-copy2to1.que @@ -0,0 +1 @@ +"測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.copy1to2.que b/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.copy1to2.que new file mode 100644 index 000000000..32f405650 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.copy1to2.que @@ -0,0 +1 @@ +"測試_file1p1" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.copy2to1.que b/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.copy2to1.que new file mode 100644 index 000000000..75775efcb --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.copy2to1.que @@ -0,0 +1 @@ +"測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path1.lst b/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path1.lst new file mode 100644 index 000000000..e657e7839 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path1.lst @@ -0,0 +1,6 @@ +# bisync listing v1 from test +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path1.lst-new b/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path1.lst-new new file mode 100644 index 000000000..b0c9313f8 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path1.lst-new @@ -0,0 +1,5 @@ +# bisync listing v1 from test +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_file1p1" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path2.lst b/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path2.lst new file mode 100644 index 000000000..e657e7839 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path2.lst @@ -0,0 +1,6 @@ +# bisync listing v1 from test +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_file1p1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path2.lst-new b/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path2.lst-new new file mode 100644 index 000000000..0aac3e9cf --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/normal-sync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path2.lst-new @@ -0,0 +1,5 @@ +# bisync listing v1 from test +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "測試_file1p2" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/resync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path1.lst b/cmd/bisync/testdata/test_extended_char_paths/golden/resync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path1.lst new file mode 100644 index 000000000..d5769bf3d --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/resync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path1.lst @@ -0,0 +1,4 @@ +# bisync listing v1 from test +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/resync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path1.lst-new b/cmd/bisync/testdata/test_extended_char_paths/golden/resync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path1.lst-new new file mode 100644 index 000000000..d5769bf3d --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/resync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path1.lst-new @@ -0,0 +1,4 @@ +# bisync listing v1 from test +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/resync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path2.lst b/cmd/bisync/testdata/test_extended_char_paths/golden/resync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path2.lst new file mode 100644 index 000000000..d5769bf3d --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/resync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path2.lst @@ -0,0 +1,4 @@ +# bisync listing v1 from test +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/resync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path2.lst-new b/cmd/bisync/testdata/test_extended_char_paths/golden/resync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path2.lst-new new file mode 100644 index 000000000..d5769bf3d --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/resync._testdir_path1_測試_РуÑÑкий_____Ä›_áñ.._testdir_path2_測試_РуÑÑкий_____Ä›_áñ.path2.lst-new @@ -0,0 +1,4 @@ +# bisync listing v1 from test +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "測試_check file" diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/test.log b/cmd/bisync/testdata/test_extended_char_paths/golden/test.log new file mode 100644 index 000000000..25010065b --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/test.log @@ -0,0 +1,100 @@ +(01) : test extended-char-paths + + +(02) : test resync subdirs with extended chars +(03) : bisync subdir=測試_РуÑÑкий_{spc}_{spc}_Ä›_áñ 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) : copy-listings resync + +(05) : test place new files with extended chars on each side + +(06) : touch-glob 2001-01-02 {datadir/} file1.txt +(07) : copy-as {datadir/}file1.txt {path1/}測試_РуÑÑкий_{spc}_{spc}_Ä›_áñ 測試_file1p1 +(08) : copy-as {datadir/}file1.txt {path2/}測試_РуÑÑкий_{spc}_{spc}_Ä›_áñ 測試_file1p2 + +(09) : test normal sync of subdirs with extended chars +(10) : bisync subdir=測試_РуÑÑкий_{spc}_{spc}_Ä›_áñ +INFO : Synching Path1 "{path1/}測試_РуÑÑкий_ _ _Ä›_áñ/" with Path2 "{path2/}測試_РуÑÑкий_ _ _Ä›_áñ/" +INFO : Path1 checking for diffs +INFO : - Path1 File is new - 測試_file1p1 +INFO : Path1: 1 changes: 1 new, 0 newer, 0 older, 0 deleted +INFO : Path2 checking for diffs +INFO : - Path2 File is new - 測試_file1p2 +INFO : Path2: 1 changes: 1 new, 0 newer, 0 older, 0 deleted +INFO : Applying changes +INFO : - Path1 Queue copy to Path2 - {path2/}測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p1 +INFO : - Path2 Queue copy to Path1 - {path1/}測試_РуÑÑкий_ _ _Ä›_áñ/測試_file1p2 +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 +(11) : move-listings normal-sync + +(12) : test check-filename with extended chars. check should fail. +(13) : 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 +(14) : delete-file {path1/}測試_РуÑÑкий_{spc}_{spc}_Ä›_áñ/測試_check{spc}file +(15) : bisync check-access check-filename=測試_check{spc}file +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File was deleted - 測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file +INFO : Path1: 1 changes: 0 new, 0 newer, 0 older, 1 deleted +INFO : Path2 checking for diffs +INFO : Checking access health +ERROR : Access test failed: Path1 count 1, Path2 count 2 - 測試_check file +ERROR : - Access test failed: Path2 file not found in Path1 - 測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file +ERROR : Bisync critical error: check file check failed +ERROR : Bisync aborted. Must run --resync to recover. +Bisync error: bisync aborted +(16) : copy-listings check-access-fail + +(17) : test check-filename with extended chars. check should pass. +(18) : bisync resync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Copying unique Path2 files to Path1 +INFO : - Path2 Resync will copy to Path1 - 測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file +INFO : - Path2 Resync is doing queued copies to - Path1 +INFO : Resynching Path1 to Path2 +INFO : Resync updating listings +INFO : Bisync successful +(19) : bisync check-access check-filename=測試_check{spc}file +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : Checking access health +INFO : Found 2 matching "測試_check file" files on both paths +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful +(20) : move-listings check-access-pass + +(21) : test filters-file path with extended chars - masks /fileZ.txt +(22) : copy-file {datadir/}測試_filtersfile.txt {workdir/} +(23) : bisync filters-file={workdir/}測試_filtersfile.txt resync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}測試_filtersfile.txt +INFO : Storing filters file hash to {workdir/}測試_filtersfile.txt.md5 +INFO : Copying unique Path2 files to Path1 +INFO : Resynching Path1 to Path2 +INFO : Resync updating listings +INFO : Bisync successful +(24) : copy-as {datadir/}file1.txt {path1/} fileZ.txt +(25) : bisync filters-file={workdir/}測試_filtersfile.txt +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}測試_filtersfile.txt +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/測試_filtersfile.txt b/cmd/bisync/testdata/test_extended_char_paths/golden/測試_filtersfile.txt new file mode 100644 index 000000000..c85f097fc --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/測試_filtersfile.txt @@ -0,0 +1,5 @@ +# Test filters file +# Note that this test checks for bisync's access to and usage of a filters file, not an extensive test of rclone's filter capability + +# Exclude fileZ.txt in root only. The copy in the subdir should be found and synched. +- /fileZ.txt diff --git a/cmd/bisync/testdata/test_extended_char_paths/golden/測試_filtersfile.txt.md5 b/cmd/bisync/testdata/test_extended_char_paths/golden/測試_filtersfile.txt.md5 new file mode 100644 index 000000000..9245ee411 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/golden/測試_filtersfile.txt.md5 @@ -0,0 +1 @@ +1cec24a8ae7c33c49693a14d53fd6a96 \ No newline at end of file diff --git a/cmd/bisync/testdata/test_extended_char_paths/initial/RCLONE_TEST b/cmd/bisync/testdata/test_extended_char_paths/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_extended_char_paths/initial/file1.txt b/cmd/bisync/testdata/test_extended_char_paths/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_extended_char_paths/initial/file_enconde_mañana_funcionará.txt b/cmd/bisync/testdata/test_extended_char_paths/initial/file_enconde_mañana_funcionará.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_extended_char_paths/initial/filename_contains_Ä›_.txt b/cmd/bisync/testdata/test_extended_char_paths/initial/filename_contains_Ä›_.txt new file mode 100644 index 000000000..a378eaef5 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/initial/filename_contains_Ä›_.txt @@ -0,0 +1,7 @@ +mañana << Coded as xF1, which is the unicode ID name, but not the correct byte stream coding. +filename_contains_\u011b_ +filename_contains_e_ + +_mañana_funcionará.txt + +file_enconde_mañana_funcionará << Valid byte stream unicode is read correctly diff --git a/cmd/bisync/testdata/test_extended_char_paths/initial/filename_contains_ࢺ_.txt b/cmd/bisync/testdata/test_extended_char_paths/initial/filename_contains_ࢺ_.txt new file mode 100644 index 000000000..a378eaef5 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/initial/filename_contains_ࢺ_.txt @@ -0,0 +1,7 @@ +mañana << Coded as xF1, which is the unicode ID name, but not the correct byte stream coding. +filename_contains_\u011b_ +filename_contains_e_ + +_mañana_funcionará.txt + +file_enconde_mañana_funcionará << Valid byte stream unicode is read correctly diff --git a/cmd/bisync/testdata/test_extended_char_paths/initial/РуÑÑкий.txt b/cmd/bisync/testdata/test_extended_char_paths/initial/РуÑÑкий.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_extended_char_paths/initial/測試_check file b/cmd/bisync/testdata/test_extended_char_paths/initial/測試_check file new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_extended_char_paths/initial/測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt b/cmd/bisync/testdata/test_extended_char_paths/initial/測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt new file mode 100644 index 000000000..a378eaef5 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/initial/測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_Ä›_.txt @@ -0,0 +1,7 @@ +mañana << Coded as xF1, which is the unicode ID name, but not the correct byte stream coding. +filename_contains_\u011b_ +filename_contains_e_ + +_mañana_funcionará.txt + +file_enconde_mañana_funcionará << Valid byte stream unicode is read correctly diff --git a/cmd/bisync/testdata/test_extended_char_paths/initial/測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt b/cmd/bisync/testdata/test_extended_char_paths/initial/測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt new file mode 100644 index 000000000..a378eaef5 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/initial/測試_РуÑÑкий_ _ _Ä›_áñ/filename_contains_ࢺ_.txt @@ -0,0 +1,7 @@ +mañana << Coded as xF1, which is the unicode ID name, but not the correct byte stream coding. +filename_contains_\u011b_ +filename_contains_e_ + +_mañana_funcionará.txt + +file_enconde_mañana_funcionará << Valid byte stream unicode is read correctly diff --git a/cmd/bisync/testdata/test_extended_char_paths/initial/測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file b/cmd/bisync/testdata/test_extended_char_paths/initial/測試_РуÑÑкий_ _ _Ä›_áñ/測試_check file new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_extended_char_paths/modfiles/file1.txt b/cmd/bisync/testdata/test_extended_char_paths/modfiles/file1.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/modfiles/file1.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_extended_char_paths/modfiles/測試_filtersfile.txt b/cmd/bisync/testdata/test_extended_char_paths/modfiles/測試_filtersfile.txt new file mode 100644 index 000000000..c85f097fc --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/modfiles/測試_filtersfile.txt @@ -0,0 +1,5 @@ +# Test filters file +# Note that this test checks for bisync's access to and usage of a filters file, not an extensive test of rclone's filter capability + +# Exclude fileZ.txt in root only. The copy in the subdir should be found and synched. +- /fileZ.txt diff --git a/cmd/bisync/testdata/test_extended_char_paths/scenario.txt b/cmd/bisync/testdata/test_extended_char_paths/scenario.txt new file mode 100644 index 000000000..32ad3fe75 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_char_paths/scenario.txt @@ -0,0 +1,45 @@ +test extended-char-paths +# Tests handling of extended UTF-8 chars in: +# path1, path2 +# --check-filename +# --filters-file (path and filename) +# +# Not tested: +# --workdir (hardcoded by test engine) +# tab in subdir (currently using '{spc}_{spc}' instead of '{tab}_{spc}') +# +# Notes: +# - Github windows runner fails to checkout repo with tabs in names. +# - Due to different encoding local backend returns the literal tab +# in logs or listings, but remotes return two ASCII chars `\t`. + +test resync subdirs with extended chars +bisync subdir=測試_РуÑÑкий_{spc}_{spc}_Ä›_áñ resync +copy-listings resync + +test place new files with extended chars on each side +# force specific modification time since file time is lost through git +touch-glob 2001-01-02 {datadir/} file1.txt +copy-as {datadir/}file1.txt {path1/}測試_РуÑÑкий_{spc}_{spc}_Ä›_áñ 測試_file1p1 +copy-as {datadir/}file1.txt {path2/}測試_РуÑÑкий_{spc}_{spc}_Ä›_áñ 測試_file1p2 + +test normal sync of subdirs with extended chars +bisync subdir=測試_РуÑÑкий_{spc}_{spc}_Ä›_áñ +move-listings normal-sync + +test check-filename with extended chars. check should fail. +bisync resync +delete-file {path1/}測試_РуÑÑкий_{spc}_{spc}_Ä›_áñ/測試_check{spc}file +bisync check-access check-filename=測試_check{spc}file +copy-listings check-access-fail + +test check-filename with extended chars. check should pass. +bisync resync +bisync check-access check-filename=測試_check{spc}file +move-listings check-access-pass + +test filters-file path with extended chars - masks /fileZ.txt +copy-file {datadir/}測試_filtersfile.txt {workdir/} +bisync filters-file={workdir/}測試_filtersfile.txt resync +copy-as {datadir/}file1.txt {path1/} fileZ.txt +bisync filters-file={workdir/}測試_filtersfile.txt diff --git a/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.copy1to2.que b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.copy1to2.que new file mode 100644 index 000000000..75c663f86 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.copy1to2.que @@ -0,0 +1,6 @@ +"file1_with white space.txt" +"filename_contains_ࢺ_p1m.txt" +"subdir_with_ࢺ_/file_with_測試_.txt" +"subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path1" +"subdir_with_ࢺ_/mañana_funcionará.txt" +"subdir_with_ࢺ_/test.txt" diff --git a/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.copy2to1.que b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.copy2to1.que new file mode 100644 index 000000000..eece110c1 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.copy2to1.que @@ -0,0 +1,7 @@ +"New_top_level_mañana_funcionará.txt" +"file_enconde_mañana_funcionará.txt" +"subdir withâŠwhite space.txt/file2 withâŠwhite space.txt" +"subdir_rawchars_â™_\x81_\xfe/file3_â™_\x81_\xfe" +"subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path2" +"subdir_with_ࢺ_/filename_contains_ࢺ_p2s.txt" +"РуÑÑкий.txt" diff --git a/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.delete1.que b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.delete1.que new file mode 100644 index 000000000..3598501fc --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.delete1.que @@ -0,0 +1,2 @@ +"filename_contains_ࢺ_.txt" +"subdir_with_ࢺ_/filename_contains_Ä›_.txt" diff --git a/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..60009c3fc --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,20 @@ +# bisync listing v1 from test +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "New_top_level_mañana_funcionará.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1 - Copy (2).txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1 - Copy.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1_with white space.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "filename_contains_ࢺ_p1m.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir withâŠwhite space.txt/file2 withâŠwhite space.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_rawchars_â™_\x81_\xfe/file3_â™_\x81_\xfe" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/file_with_測試_.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-03T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path2" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_ࢺ_.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_ࢺ_p2s.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/mañana_funcionará.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/test.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "РуÑÑкий.txt" diff --git a/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..fa06c1786 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,16 @@ +# 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 - Copy (2).txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1 - Copy.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1_with white space.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_ࢺ_.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "filename_contains_ࢺ_p1m.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/file_with_測試_.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-03T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_Ä›_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_ࢺ_.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/mañana_funcionará.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/test.txt" diff --git a/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..60009c3fc --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,20 @@ +# bisync listing v1 from test +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "New_top_level_mañana_funcionará.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1 - Copy (2).txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1 - Copy.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1_with white space.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "filename_contains_ࢺ_p1m.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir withâŠwhite space.txt/file2 withâŠwhite space.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_rawchars_â™_\x81_\xfe/file3_â™_\x81_\xfe" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/file_with_測試_.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-03T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path1" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path2" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_ࢺ_.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_ࢺ_p2s.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/mañana_funcionará.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/test.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "РуÑÑкий.txt" diff --git a/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..5f3e1c9f1 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,14 @@ +# bisync listing v1 from test +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "New_top_level_mañana_funcionará.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1 - Copy (2).txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1 - Copy.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file_enconde_mañana_funcionará.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "filename_contains_Ä›_.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir withâŠwhite space.txt/file2 withâŠwhite space.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_rawchars_â™_\x81_\xfe/file3_â™_\x81_\xfe" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt" +- 272 md5:0033328434f9662a7dae0d1aee7768b6 - 2000-01-01T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_ࢺ_.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir_with_ࢺ_/filename_contains_ࢺ_p2s.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "РуÑÑкий.txt" diff --git a/cmd/bisync/testdata/test_extended_filenames/golden/test.log b/cmd/bisync/testdata/test_extended_filenames/golden/test.log new file mode 100644 index 000000000..9aef61002 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/golden/test.log @@ -0,0 +1,84 @@ +(01) : test extended-filenames + + +(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 a newer files on both paths + +(05) : touch-glob 2001-01-02 {datadir/} file1.txt +(06) : copy-as {datadir/}file1.txt {path2/} New_top_level_mañana_funcionará.txt +(07) : copy-as {datadir/}file1.txt {path2/} file_enconde_mañana_funcionará.txt +(08) : copy-as {datadir/}file1.txt {path1/} filename_contains_ࢺ_p1m.txt +(09) : copy-as {datadir/}file1.txt {path2/} РуÑÑкий.txt +(10) : copy-as {datadir/}file1.txt {path1/} file1_with{spc}white{spc}space.txt +(11) : copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ test.txt +(12) : copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ mañana_funcionará.txt +(13) : copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ file_with_測試_.txt +(14) : copy-as {datadir/}file1.txt {path2/}subdir_with_ࢺ_ filename_contains_ࢺ_p2s.txt +(15) : copy-as {datadir/}file1.txt {path2/}subdir{spc}with{eol}white{spc}space.txt file2{spc}with{eol}white{spc}space.txt +(16) : copy-as {datadir/}file1.txt {path2/}subdir_rawchars_{chr:19}_{chr:81}_{chr:fe} file3_{chr:19}_{chr:81}_{chr:fe} + +(17) : test place a new file on both paths +(18) : copy-as {datadir/}file1.txt {path2/}subdir_with_ࢺ_ filechangedbothpaths_ࢺ_.txt +(19) : touch-glob 2001-01-03 {datadir/} file1.txt +(20) : copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ filechangedbothpaths_ࢺ_.txt + +(21) : test delete files on both paths +(22) : delete-file {path2/}filename_contains_ࢺ_.txt +(23) : delete-file {path2/}subdir_with_ࢺ_/filename_contains_Ä›_.txt +(24) : delete-file {path1/}РуÑÑкий.txt + +(25) : test bisync run +(26) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File is new - file1_with white space.txt +INFO : - Path1 File is new - filename_contains_ࢺ_p1m.txt +INFO : - Path1 File is new - subdir_with_ࢺ_/file_with_測試_.txt +INFO : - Path1 File is new - subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt +INFO : - Path1 File is new - subdir_with_ࢺ_/mañana_funcionará.txt +INFO : - Path1 File is new - subdir_with_ࢺ_/test.txt +INFO : - Path1 File was deleted - РуÑÑкий.txt +INFO : Path1: 7 changes: 6 new, 0 newer, 0 older, 1 deleted +INFO : Path2 checking for diffs +INFO : - Path2 File is new - "subdir_rawchars_â™_\x81_\xfe/file3_â™_\x81_\xfe" +INFO : - Path2 File is new - New_top_level_mañana_funcionará.txt +INFO : - Path2 File is new - subdir withâŠwhite space.txt/file2 withâŠwhite space.txt +INFO : - Path2 File is new - subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt +INFO : - Path2 File is new - subdir_with_ࢺ_/filename_contains_ࢺ_p2s.txt +INFO : - Path2 File is newer - file_enconde_mañana_funcionará.txt +INFO : - Path2 File is newer - РуÑÑкий.txt +INFO : - Path2 File was deleted - filename_contains_ࢺ_.txt +INFO : - Path2 File was deleted - subdir_with_ࢺ_/filename_contains_Ä›_.txt +INFO : Path2: 9 changes: 5 new, 2 newer, 0 older, 2 deleted +INFO : Applying changes +INFO : - Path1 Queue copy to Path2 - {path2/}file1_with white space.txt +INFO : - Path1 Queue copy to Path2 - {path2/}filename_contains_ࢺ_p1m.txt +INFO : - Path1 Queue copy to Path2 - {path2/}subdir_with_ࢺ_/file_with_測試_.txt +NOTICE: - WARNING New or changed in both paths - subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt +NOTICE: - Path1 Renaming Path1 copy - {path1/}subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path1 +NOTICE: - Path1 Queue copy to Path2 - {path2/}subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path1 +NOTICE: - Path2 Renaming Path2 copy - {path2/}subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path2 +NOTICE: - Path2 Queue copy to Path1 - {path1/}subdir_with_ࢺ_/filechangedbothpaths_ࢺ_.txt..path2 +INFO : - Path1 Queue copy to Path2 - {path2/}subdir_with_ࢺ_/mañana_funcionará.txt +INFO : - Path1 Queue copy to Path2 - {path2/}subdir_with_ࢺ_/test.txt +INFO : - Path2 Queue copy to Path1 - {path1/}РуÑÑкий.txt +INFO : - Path2 Queue copy to Path1 - {path1/}New_top_level_mañana_funcionará.txt +INFO : - Path2 Queue copy to Path1 - {path1/}file_enconde_mañana_funcionará.txt +INFO : - Path1 Queue delete - {path1/}filename_contains_ࢺ_.txt +INFO : - Path2 Queue copy to Path1 - {path1/}subdir withâŠwhite space.txt/file2 withâŠwhite space.txt +INFO : - Path2 Queue copy to Path1 - "{path1/}subdir_rawchars_â™_\x81_\xfe/file3_â™_\x81_\xfe" +INFO : - Path1 Queue delete - {path1/}subdir_with_ࢺ_/filename_contains_Ä›_.txt +INFO : - Path2 Queue copy to Path1 - {path1/}subdir_with_ࢺ_/filename_contains_ࢺ_p2s.txt +INFO : - Path2 Do queued copies to - Path1 +INFO : - Path1 Do queued copies to - Path2 +INFO : - Do queued deletes on - Path1 +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful diff --git a/cmd/bisync/testdata/test_extended_filenames/initial/RCLONE_TEST b/cmd/bisync/testdata/test_extended_filenames/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_extended_filenames/initial/file1 - Copy (2).txt b/cmd/bisync/testdata/test_extended_filenames/initial/file1 - Copy (2).txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_extended_filenames/initial/file1 - Copy.txt b/cmd/bisync/testdata/test_extended_filenames/initial/file1 - Copy.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_extended_filenames/initial/file1.txt b/cmd/bisync/testdata/test_extended_filenames/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_extended_filenames/initial/file_enconde_mañana_funcionará.txt b/cmd/bisync/testdata/test_extended_filenames/initial/file_enconde_mañana_funcionará.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_extended_filenames/initial/filename_contains_Ä›_.txt b/cmd/bisync/testdata/test_extended_filenames/initial/filename_contains_Ä›_.txt new file mode 100644 index 000000000..a378eaef5 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/initial/filename_contains_Ä›_.txt @@ -0,0 +1,7 @@ +mañana << Coded as xF1, which is the unicode ID name, but not the correct byte stream coding. +filename_contains_\u011b_ +filename_contains_e_ + +_mañana_funcionará.txt + +file_enconde_mañana_funcionará << Valid byte stream unicode is read correctly diff --git a/cmd/bisync/testdata/test_extended_filenames/initial/filename_contains_ࢺ_.txt b/cmd/bisync/testdata/test_extended_filenames/initial/filename_contains_ࢺ_.txt new file mode 100644 index 000000000..a378eaef5 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/initial/filename_contains_ࢺ_.txt @@ -0,0 +1,7 @@ +mañana << Coded as xF1, which is the unicode ID name, but not the correct byte stream coding. +filename_contains_\u011b_ +filename_contains_e_ + +_mañana_funcionará.txt + +file_enconde_mañana_funcionará << Valid byte stream unicode is read correctly diff --git a/cmd/bisync/testdata/test_extended_filenames/initial/subdir_with_ࢺ_/filename_contains_Ä›_.txt b/cmd/bisync/testdata/test_extended_filenames/initial/subdir_with_ࢺ_/filename_contains_Ä›_.txt new file mode 100644 index 000000000..a378eaef5 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/initial/subdir_with_ࢺ_/filename_contains_Ä›_.txt @@ -0,0 +1,7 @@ +mañana << Coded as xF1, which is the unicode ID name, but not the correct byte stream coding. +filename_contains_\u011b_ +filename_contains_e_ + +_mañana_funcionará.txt + +file_enconde_mañana_funcionará << Valid byte stream unicode is read correctly diff --git a/cmd/bisync/testdata/test_extended_filenames/initial/subdir_with_ࢺ_/filename_contains_ࢺ_.txt b/cmd/bisync/testdata/test_extended_filenames/initial/subdir_with_ࢺ_/filename_contains_ࢺ_.txt new file mode 100644 index 000000000..a378eaef5 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/initial/subdir_with_ࢺ_/filename_contains_ࢺ_.txt @@ -0,0 +1,7 @@ +mañana << Coded as xF1, which is the unicode ID name, but not the correct byte stream coding. +filename_contains_\u011b_ +filename_contains_e_ + +_mañana_funcionará.txt + +file_enconde_mañana_funcionará << Valid byte stream unicode is read correctly diff --git a/cmd/bisync/testdata/test_extended_filenames/initial/РуÑÑкий.txt b/cmd/bisync/testdata/test_extended_filenames/initial/РуÑÑкий.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_extended_filenames/modfiles/file1.txt b/cmd/bisync/testdata/test_extended_filenames/modfiles/file1.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/modfiles/file1.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_extended_filenames/scenario.txt b/cmd/bisync/testdata/test_extended_filenames/scenario.txt new file mode 100644 index 000000000..7c722720a --- /dev/null +++ b/cmd/bisync/testdata/test_extended_filenames/scenario.txt @@ -0,0 +1,42 @@ +test extended-filenames +# Tests with several files and a subdirectory +# that contain UTF-8 code points or whitespace. +# +# Notes: +# - All rclone backends including local return "\n" aka {eol} in file names +# as a pseudographic unicode glyph, thus we don't see `\n` in golden logs. +# - File names with "\t" aka {tab} pass with local, dropbox, and drive +# backends, but fail with FTP. As a workaround, the test currently uses +# `name{spc}with{eol}white{spc}space` instead of +# `name{tab}with{eol}white{spc}space`. + +test initial bisync +bisync resync + +test place a newer files on both paths +# force specific modification time since file time is lost through git +touch-glob 2001-01-02 {datadir/} file1.txt +copy-as {datadir/}file1.txt {path2/} New_top_level_mañana_funcionará.txt +copy-as {datadir/}file1.txt {path2/} file_enconde_mañana_funcionará.txt +copy-as {datadir/}file1.txt {path1/} filename_contains_ࢺ_p1m.txt +copy-as {datadir/}file1.txt {path2/} РуÑÑкий.txt +copy-as {datadir/}file1.txt {path1/} file1_with{spc}white{spc}space.txt +copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ test.txt +copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ mañana_funcionará.txt +copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ file_with_測試_.txt +copy-as {datadir/}file1.txt {path2/}subdir_with_ࢺ_ filename_contains_ࢺ_p2s.txt +copy-as {datadir/}file1.txt {path2/}subdir{spc}with{eol}white{spc}space.txt file2{spc}with{eol}white{spc}space.txt +copy-as {datadir/}file1.txt {path2/}subdir_rawchars_{chr:19}_{chr:81}_{chr:fe} file3_{chr:19}_{chr:81}_{chr:fe} + +test place a new file on both paths +copy-as {datadir/}file1.txt {path2/}subdir_with_ࢺ_ filechangedbothpaths_ࢺ_.txt +touch-glob 2001-01-03 {datadir/} file1.txt +copy-as {datadir/}file1.txt {path1/}subdir_with_ࢺ_ filechangedbothpaths_ࢺ_.txt + +test delete files on both paths +delete-file {path2/}filename_contains_ࢺ_.txt +delete-file {path2/}subdir_with_ࢺ_/filename_contains_Ä›_.txt +delete-file {path1/}РуÑÑкий.txt + +test bisync run +bisync diff --git a/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.copy1to2.que b/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.copy1to2.que new file mode 100644 index 000000000..f1ed1ab42 --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.copy1to2.que @@ -0,0 +1 @@ +"subdir/fileZ.txt" diff --git a/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..b2c606651 --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,11 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir/fileZ.txt" diff --git a/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..b2c606651 --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,11 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir/fileZ.txt" diff --git a/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..b2c606651 --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,11 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "subdir/fileZ.txt" diff --git a/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..c3767400b --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_filters/golden/filtersfile.flt b/cmd/bisync/testdata/test_filters/golden/filtersfile.flt new file mode 100644 index 000000000..c85f097fc --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/filtersfile.flt @@ -0,0 +1,5 @@ +# Test filters file +# Note that this test checks for bisync's access to and usage of a filters file, not an extensive test of rclone's filter capability + +# Exclude fileZ.txt in root only. The copy in the subdir should be found and synched. +- /fileZ.txt diff --git a/cmd/bisync/testdata/test_filters/golden/filtersfile.flt.md5 b/cmd/bisync/testdata/test_filters/golden/filtersfile.flt.md5 new file mode 100644 index 000000000..9245ee411 --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/filtersfile.flt.md5 @@ -0,0 +1 @@ +1cec24a8ae7c33c49693a14d53fd6a96 \ No newline at end of file diff --git a/cmd/bisync/testdata/test_filters/golden/resync._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_filters/golden/resync._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..c3767400b --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/resync._testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_filters/golden/resync._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_filters/golden/resync._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..c3767400b --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/resync._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_filters/golden/resync._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_filters/golden/resync._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..c3767400b --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/resync._testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_filters/golden/resync._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_filters/golden/resync._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..c3767400b --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/resync._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,10 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_filters/golden/resync.filtersfile.flt b/cmd/bisync/testdata/test_filters/golden/resync.filtersfile.flt new file mode 100644 index 000000000..c85f097fc --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/resync.filtersfile.flt @@ -0,0 +1,5 @@ +# Test filters file +# Note that this test checks for bisync's access to and usage of a filters file, not an extensive test of rclone's filter capability + +# Exclude fileZ.txt in root only. The copy in the subdir should be found and synched. +- /fileZ.txt diff --git a/cmd/bisync/testdata/test_filters/golden/resync.filtersfile.flt.md5 b/cmd/bisync/testdata/test_filters/golden/resync.filtersfile.flt.md5 new file mode 100644 index 000000000..9245ee411 --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/resync.filtersfile.flt.md5 @@ -0,0 +1 @@ +1cec24a8ae7c33c49693a14d53fd6a96 \ No newline at end of file diff --git a/cmd/bisync/testdata/test_filters/golden/test.log b/cmd/bisync/testdata/test_filters/golden/test.log new file mode 100644 index 000000000..fa4b62d31 --- /dev/null +++ b/cmd/bisync/testdata/test_filters/golden/test.log @@ -0,0 +1,36 @@ +(01) : test filters + + +(02) : copy-file {datadir/}filtersfile.flt {workdir/} + +(03) : test resync to force building of the filters md5 hash +(04) : bisync filters-file={workdir/}filtersfile.flt resync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}filtersfile.flt +INFO : Storing filters file hash to {workdir/}filtersfile.flt.md5 +INFO : Copying unique Path2 files to Path1 +INFO : Resynching Path1 to Path2 +INFO : Resync updating listings +INFO : Bisync successful + +(05) : copy-listings resync + +(06) : test place new files on the remote +(07) : touch-glob 2001-01-02 {datadir/} fileZ.txt +(08) : copy-as {datadir/}fileZ.txt {path2/} fileZ.txt +(09) : copy-as {datadir/}fileZ.txt {path1/}subdir fileZ.txt + +(10) : test bisync with filters-file. path2-side fileZ.txt will be filtered. +(11) : bisync filters-file={workdir/}filtersfile.flt +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}filtersfile.flt +INFO : Path1 checking for diffs +INFO : - Path1 File is new - subdir/fileZ.txt +INFO : Path1: 1 changes: 1 new, 0 newer, 0 older, 0 deleted +INFO : Path2 checking for diffs +INFO : Applying changes +INFO : - Path1 Queue copy to Path2 - {path2/}subdir/fileZ.txt +INFO : - Path1 Do queued copies to - Path2 +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful diff --git a/cmd/bisync/testdata/test_filters/initial/RCLONE_TEST b/cmd/bisync/testdata/test_filters/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_filters/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_filters/initial/file1.txt b/cmd/bisync/testdata/test_filters/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_filters/initial/file2.txt b/cmd/bisync/testdata/test_filters/initial/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_filters/initial/file3.txt b/cmd/bisync/testdata/test_filters/initial/file3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_filters/initial/file4.txt b/cmd/bisync/testdata/test_filters/initial/file4.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_filters/initial/file5.txt b/cmd/bisync/testdata/test_filters/initial/file5.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_filters/initial/file6.txt b/cmd/bisync/testdata/test_filters/initial/file6.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_filters/initial/file7.txt b/cmd/bisync/testdata/test_filters/initial/file7.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_filters/initial/subdir/file20.txt b/cmd/bisync/testdata/test_filters/initial/subdir/file20.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_filters/modfiles/fileZ.txt b/cmd/bisync/testdata/test_filters/modfiles/fileZ.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_filters/modfiles/fileZ.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_filters/modfiles/filtersfile.flt b/cmd/bisync/testdata/test_filters/modfiles/filtersfile.flt new file mode 100644 index 000000000..c85f097fc --- /dev/null +++ b/cmd/bisync/testdata/test_filters/modfiles/filtersfile.flt @@ -0,0 +1,5 @@ +# Test filters file +# Note that this test checks for bisync's access to and usage of a filters file, not an extensive test of rclone's filter capability + +# Exclude fileZ.txt in root only. The copy in the subdir should be found and synched. +- /fileZ.txt diff --git a/cmd/bisync/testdata/test_filters/scenario.txt b/cmd/bisync/testdata/test_filters/scenario.txt new file mode 100644 index 000000000..1b17bd1cd --- /dev/null +++ b/cmd/bisync/testdata/test_filters/scenario.txt @@ -0,0 +1,21 @@ +test filters +# Tests operation of bisync --filters-file flag. +# Note that this test checks for bisync's access to and usage of the +# filters file, not an extensive test of rclone's filter capability. + +# Exclude fileZ.txt in root only. +# The copy in the subdir should be found and synched. +copy-file {datadir/}filtersfile.flt {workdir/} + +test resync to force building of the filters md5 hash +bisync filters-file={workdir/}filtersfile.flt resync +# copy-listings will copy listings, queues (.que) and filters (.flt) +copy-listings resync + +test place new files on the remote +touch-glob 2001-01-02 {datadir/} fileZ.txt +copy-as {datadir/}fileZ.txt {path2/} fileZ.txt +copy-as {datadir/}fileZ.txt {path1/}subdir fileZ.txt + +test bisync with filters-file. path2-side fileZ.txt will be filtered. +bisync filters-file={workdir/}filtersfile.flt diff --git a/cmd/bisync/testdata/test_filtersfile_checks/golden/_testdir_path1.._testdir_path2.path1.lst-err b/cmd/bisync/testdata/test_filtersfile_checks/golden/_testdir_path1.._testdir_path2.path1.lst-err new file mode 100644 index 000000000..844684626 --- /dev/null +++ b/cmd/bisync/testdata/test_filtersfile_checks/golden/_testdir_path1.._testdir_path2.path1.lst-err @@ -0,0 +1,5 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_filtersfile_checks/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_filtersfile_checks/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..844684626 --- /dev/null +++ b/cmd/bisync/testdata/test_filtersfile_checks/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,5 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_filtersfile_checks/golden/_testdir_path1.._testdir_path2.path2.lst-err b/cmd/bisync/testdata/test_filtersfile_checks/golden/_testdir_path1.._testdir_path2.path2.lst-err new file mode 100644 index 000000000..844684626 --- /dev/null +++ b/cmd/bisync/testdata/test_filtersfile_checks/golden/_testdir_path1.._testdir_path2.path2.lst-err @@ -0,0 +1,5 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_filtersfile_checks/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_filtersfile_checks/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..844684626 --- /dev/null +++ b/cmd/bisync/testdata/test_filtersfile_checks/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,5 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_filtersfile_checks/golden/filtersfile.txt b/cmd/bisync/testdata/test_filtersfile_checks/golden/filtersfile.txt new file mode 100644 index 000000000..3c8d579fe --- /dev/null +++ b/cmd/bisync/testdata/test_filtersfile_checks/golden/filtersfile.txt @@ -0,0 +1,5 @@ +# Test filters file - DIFFERENT +# Note that this test checks for bisync's access to a filters file, not an extensive test of rclone's filter capability + +# Exclude fileZ.txt in root only. The copy in the subdir should be found and synched. +- /fileZ.txt diff --git a/cmd/bisync/testdata/test_filtersfile_checks/golden/filtersfile.txt.md5 b/cmd/bisync/testdata/test_filtersfile_checks/golden/filtersfile.txt.md5 new file mode 100644 index 000000000..f508d848b --- /dev/null +++ b/cmd/bisync/testdata/test_filtersfile_checks/golden/filtersfile.txt.md5 @@ -0,0 +1 @@ +cbf4389cb34d9e160689d1578eb5707f \ No newline at end of file diff --git a/cmd/bisync/testdata/test_filtersfile_checks/golden/test.log b/cmd/bisync/testdata/test_filtersfile_checks/golden/test.log new file mode 100644 index 000000000..606e06ef7 --- /dev/null +++ b/cmd/bisync/testdata/test_filtersfile_checks/golden/test.log @@ -0,0 +1,60 @@ +(01) : test filtersfile-checks + + +(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 1. inject filters file in workdir. +(05) : copy-file {datadir/}filtersfile.txt {workdir/} + +(06) : test 2. run with filters-file but without md5. should abort. +(07) : bisync filters-file={workdir/}filtersfile.txt +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}filtersfile.txt +ERROR : Bisync critical error: filters file md5 hash not found (must run --resync): {workdir/}filtersfile.txt +ERROR : Bisync aborted. Must run --resync to recover. +Bisync error: bisync aborted + +(08) : test 3. run without filters-file. should be blocked due to prior abort. +(09) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +ERROR : Bisync critical error: cannot find prior Path1 or Path2 listings, likely due to critical error on prior run +ERROR : Bisync aborted. Must run --resync to recover. +Bisync error: bisync aborted + +(10) : test 4. run with filters-file and resync. +(11) : bisync filters-file={workdir/}filtersfile.txt resync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}filtersfile.txt +INFO : Storing filters file hash to {workdir/}filtersfile.txt.md5 +INFO : Copying unique Path2 files to Path1 +INFO : Resynching Path1 to Path2 +INFO : Resync updating listings +INFO : Bisync successful + +(12) : test 5. run with filters-file alone. should run. +(13) : bisync filters-file={workdir/}filtersfile.txt +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}filtersfile.txt +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful + +(14) : test 6. push changed filters-file to workdir. +(15) : copy-as {datadir/}filtersfile2.txt {workdir/} filtersfile.txt + +(16) : test 7. run with filters-file alone. should abort. +(17) : bisync filters-file={workdir/}filtersfile.txt +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Using filters file {workdir/}filtersfile.txt +ERROR : Bisync critical error: filters file has changed (must run --resync): {workdir/}filtersfile.txt +ERROR : Bisync aborted. Must run --resync to recover. +Bisync error: bisync aborted diff --git a/cmd/bisync/testdata/test_filtersfile_checks/initial/RCLONE_TEST b/cmd/bisync/testdata/test_filtersfile_checks/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_filtersfile_checks/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_filtersfile_checks/initial/file1.txt b/cmd/bisync/testdata/test_filtersfile_checks/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_filtersfile_checks/initial/file2.txt b/cmd/bisync/testdata/test_filtersfile_checks/initial/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_filtersfile_checks/initial/subdir/file20.txt b/cmd/bisync/testdata/test_filtersfile_checks/initial/subdir/file20.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_filtersfile_checks/modfiles/filtersfile.txt b/cmd/bisync/testdata/test_filtersfile_checks/modfiles/filtersfile.txt new file mode 100644 index 000000000..c5665a626 --- /dev/null +++ b/cmd/bisync/testdata/test_filtersfile_checks/modfiles/filtersfile.txt @@ -0,0 +1,11 @@ +# Test filters file +# Note that this test checks for bisync's access to a filters file, not an extensive test of rclone's filter capability + +# Exclude fileZ.txt in root only. The copy in the subdir should be found and synched. +- /fileZ.txt + +# Checks support for extended alphabets, such as Cyrillic +- /РаÑшаренное/** +- /Lightroom/** +- /iPad 1/** +- /Поездки/** diff --git a/cmd/bisync/testdata/test_filtersfile_checks/modfiles/filtersfile2.txt b/cmd/bisync/testdata/test_filtersfile_checks/modfiles/filtersfile2.txt new file mode 100644 index 000000000..3c8d579fe --- /dev/null +++ b/cmd/bisync/testdata/test_filtersfile_checks/modfiles/filtersfile2.txt @@ -0,0 +1,5 @@ +# Test filters file - DIFFERENT +# Note that this test checks for bisync's access to a filters file, not an extensive test of rclone's filter capability + +# Exclude fileZ.txt in root only. The copy in the subdir should be found and synched. +- /fileZ.txt diff --git a/cmd/bisync/testdata/test_filtersfile_checks/modfiles/hold.txt b/cmd/bisync/testdata/test_filtersfile_checks/modfiles/hold.txt new file mode 100644 index 000000000..a567f8bd4 --- /dev/null +++ b/cmd/bisync/testdata/test_filtersfile_checks/modfiles/hold.txt @@ -0,0 +1 @@ +This file prevents bisync from deleting empty directories. diff --git a/cmd/bisync/testdata/test_filtersfile_checks/scenario.txt b/cmd/bisync/testdata/test_filtersfile_checks/scenario.txt new file mode 100644 index 000000000..0cb206cef --- /dev/null +++ b/cmd/bisync/testdata/test_filtersfile_checks/scenario.txt @@ -0,0 +1,36 @@ +test filtersfile-checks +# Tests bisync's --filters-file MD5 hash checks logic +# Note that this test checks for bisync's handling of the filters files, +# not an extensive test of rclone's filter capability. +# The effectiveness of the filters is not tested. +# Sequence: +# 1. Run with --filters-file but with no MD5. Should critical abort. +# 2. Run without --filtersfile. Should be blocked due to prior critical abort. +# 3. Run with --filters-file and --resync. +# 4. Run with --filters-file alone. Should run. +# 5. Push changed filters file. +# 6. Run with --filters-file alone. Should critical abort. + +test initial bisync +bisync resync + +test 1. inject filters file in workdir. +copy-file {datadir/}filtersfile.txt {workdir/} + +test 2. run with filters-file but without md5. should abort. +bisync filters-file={workdir/}filtersfile.txt + +test 3. run without filters-file. should be blocked due to prior abort. +bisync + +test 4. run with filters-file and resync. +bisync filters-file={workdir/}filtersfile.txt resync + +test 5. run with filters-file alone. should run. +bisync filters-file={workdir/}filtersfile.txt + +test 6. push changed filters-file to workdir. +copy-as {datadir/}filtersfile2.txt {workdir/} filtersfile.txt + +test 7. run with filters-file alone. should abort. +bisync filters-file={workdir/}filtersfile.txt diff --git a/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.delete2.que b/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.delete2.que new file mode 100644 index 000000000..9c041c2ba --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.delete2.que @@ -0,0 +1,5 @@ +"file1.txt" +"file2.txt" +"file3.txt" +"file4.txt" +"file5.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..b454740c0 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,5 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..b454740c0 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,5 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..b454740c0 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,5 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..a105688f2 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path1/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,10 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path1/golden/initial-fail._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_max_delete_path1/golden/initial-fail._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..a105688f2 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path1/golden/initial-fail._testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,10 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path1/golden/initial-fail._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_max_delete_path1/golden/initial-fail._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..b454740c0 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path1/golden/initial-fail._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,5 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path1/golden/initial-fail._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_max_delete_path1/golden/initial-fail._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..a105688f2 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path1/golden/initial-fail._testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,10 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path1/golden/initial-fail._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_max_delete_path1/golden/initial-fail._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..a105688f2 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path1/golden/initial-fail._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,10 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path1/golden/test.log b/cmd/bisync/testdata/test_max_delete_path1/golden/test.log new file mode 100644 index 000000000..c7c208211 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path1/golden/test.log @@ -0,0 +1,55 @@ +(01) : test max-delete-path1 + + +(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 delete >50% of local files +(05) : delete-file {path1/}file1.txt +(06) : delete-file {path1/}file2.txt +(07) : delete-file {path1/}file3.txt +(08) : delete-file {path1/}file4.txt +(09) : delete-file {path1/}file5.txt + +(10) : test sync should fail due to too many local deletes +(11) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File was deleted - file1.txt +INFO : - Path1 File was deleted - file2.txt +INFO : - Path1 File was deleted - file3.txt +INFO : - Path1 File was deleted - file4.txt +INFO : - Path1 File was deleted - file5.txt +INFO : Path1: 5 changes: 0 new, 0 newer, 0 older, 5 deleted +INFO : Path2 checking for diffs +ERROR : Safety abort: too many deletes (>50%, 5 of 9) on Path1 "{path1/}". Run with --force if desired. +NOTICE: Bisync aborted. Please try again. +Bisync error: too many deletes +(12) : copy-listings initial-fail + +(13) : test change max-delete limit to 60%. sync should run. +(14) : bisync max-delete=60 +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File was deleted - file1.txt +INFO : - Path1 File was deleted - file2.txt +INFO : - Path1 File was deleted - file3.txt +INFO : - Path1 File was deleted - file4.txt +INFO : - Path1 File was deleted - file5.txt +INFO : Path1: 5 changes: 0 new, 0 newer, 0 older, 5 deleted +INFO : Path2 checking for diffs +INFO : Applying changes +INFO : - Path2 Queue delete - {path2/}file1.txt +INFO : - Path2 Queue delete - {path2/}file2.txt +INFO : - Path2 Queue delete - {path2/}file3.txt +INFO : - Path2 Queue delete - {path2/}file4.txt +INFO : - Path2 Queue delete - {path2/}file5.txt +INFO : - Do queued deletes on - Path2 +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful diff --git a/cmd/bisync/testdata/test_max_delete_path1/initial/file1.txt b/cmd/bisync/testdata/test_max_delete_path1/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path1/initial/file2.txt b/cmd/bisync/testdata/test_max_delete_path1/initial/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path1/initial/file3.txt b/cmd/bisync/testdata/test_max_delete_path1/initial/file3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path1/initial/file4.txt b/cmd/bisync/testdata/test_max_delete_path1/initial/file4.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path1/initial/file5.txt b/cmd/bisync/testdata/test_max_delete_path1/initial/file5.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path1/initial/file6.txt b/cmd/bisync/testdata/test_max_delete_path1/initial/file6.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path1/initial/file7.txt b/cmd/bisync/testdata/test_max_delete_path1/initial/file7.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path1/initial/file8.txt b/cmd/bisync/testdata/test_max_delete_path1/initial/file8.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path1/initial/file9.txt b/cmd/bisync/testdata/test_max_delete_path1/initial/file9.txt new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path1/initial/file9.txt @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_max_delete_path1/modfiles/hold.txt b/cmd/bisync/testdata/test_max_delete_path1/modfiles/hold.txt new file mode 100644 index 000000000..a567f8bd4 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path1/modfiles/hold.txt @@ -0,0 +1 @@ +This file prevents bisync from deleting empty directories. diff --git a/cmd/bisync/testdata/test_max_delete_path1/scenario.txt b/cmd/bisync/testdata/test_max_delete_path1/scenario.txt new file mode 100644 index 000000000..87ff4f0c8 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path1/scenario.txt @@ -0,0 +1,21 @@ +test max-delete-path1 +# - Set up with 9 files. +# - Delete 5 files from Path1, causing max-delete error. +# - Run with --max-delete=60% to allow sync. + +test initial bisync +bisync resync + +test delete >50% of local files +delete-file {path1/}file1.txt +delete-file {path1/}file2.txt +delete-file {path1/}file3.txt +delete-file {path1/}file4.txt +delete-file {path1/}file5.txt + +test sync should fail due to too many local deletes +bisync +copy-listings initial-fail + +test change max-delete limit to 60%. sync should run. +bisync max-delete=60 diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.delete1.que b/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.delete1.que new file mode 100644 index 000000000..9c041c2ba --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.delete1.que @@ -0,0 +1,5 @@ +"file1.txt" +"file2.txt" +"file3.txt" +"file4.txt" +"file5.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..b454740c0 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,5 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..a105688f2 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,10 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..b454740c0 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,5 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..b454740c0 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path2_force/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,5 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/golden/initial-fail._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_max_delete_path2_force/golden/initial-fail._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..a105688f2 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path2_force/golden/initial-fail._testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,10 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/golden/initial-fail._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_max_delete_path2_force/golden/initial-fail._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..a105688f2 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path2_force/golden/initial-fail._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,10 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/golden/initial-fail._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_max_delete_path2_force/golden/initial-fail._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..a105688f2 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path2_force/golden/initial-fail._testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,10 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/golden/initial-fail._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_max_delete_path2_force/golden/initial-fail._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..b454740c0 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path2_force/golden/initial-fail._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,5 @@ +# bisync listing v1 from test +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file8.txt" +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "file9.txt" diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/golden/test.log b/cmd/bisync/testdata/test_max_delete_path2_force/golden/test.log new file mode 100644 index 000000000..58da0c3a3 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path2_force/golden/test.log @@ -0,0 +1,55 @@ +(01) : test max-delete-path2-force + + +(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 delete >50% of remote files +(05) : delete-file {path2/}file1.txt +(06) : delete-file {path2/}file2.txt +(07) : delete-file {path2/}file3.txt +(08) : delete-file {path2/}file4.txt +(09) : delete-file {path2/}file5.txt + +(10) : test sync should fail due to too many path2 deletes +(11) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : - Path2 File was deleted - file1.txt +INFO : - Path2 File was deleted - file2.txt +INFO : - Path2 File was deleted - file3.txt +INFO : - Path2 File was deleted - file4.txt +INFO : - Path2 File was deleted - file5.txt +INFO : Path2: 5 changes: 0 new, 0 newer, 0 older, 5 deleted +ERROR : Safety abort: too many deletes (>50%, 5 of 9) on Path2 "{path2/}". Run with --force if desired. +NOTICE: Bisync aborted. Please try again. +Bisync error: too many deletes +(12) : copy-listings initial-fail + +(13) : test apply force option. sync should run. +(14) : bisync force +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : - Path2 File was deleted - file1.txt +INFO : - Path2 File was deleted - file2.txt +INFO : - Path2 File was deleted - file3.txt +INFO : - Path2 File was deleted - file4.txt +INFO : - Path2 File was deleted - file5.txt +INFO : Path2: 5 changes: 0 new, 0 newer, 0 older, 5 deleted +INFO : Applying changes +INFO : - Path1 Queue delete - {path1/}file1.txt +INFO : - Path1 Queue delete - {path1/}file2.txt +INFO : - Path1 Queue delete - {path1/}file3.txt +INFO : - Path1 Queue delete - {path1/}file4.txt +INFO : - Path1 Queue delete - {path1/}file5.txt +INFO : - Do queued deletes on - Path1 +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/initial/file1.txt b/cmd/bisync/testdata/test_max_delete_path2_force/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/initial/file2.txt b/cmd/bisync/testdata/test_max_delete_path2_force/initial/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/initial/file3.txt b/cmd/bisync/testdata/test_max_delete_path2_force/initial/file3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/initial/file4.txt b/cmd/bisync/testdata/test_max_delete_path2_force/initial/file4.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/initial/file5.txt b/cmd/bisync/testdata/test_max_delete_path2_force/initial/file5.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/initial/file6.txt b/cmd/bisync/testdata/test_max_delete_path2_force/initial/file6.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/initial/file7.txt b/cmd/bisync/testdata/test_max_delete_path2_force/initial/file7.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/initial/file8.txt b/cmd/bisync/testdata/test_max_delete_path2_force/initial/file8.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/initial/file9.txt b/cmd/bisync/testdata/test_max_delete_path2_force/initial/file9.txt new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path2_force/initial/file9.txt @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/modfiles/hold.txt b/cmd/bisync/testdata/test_max_delete_path2_force/modfiles/hold.txt new file mode 100644 index 000000000..a567f8bd4 --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path2_force/modfiles/hold.txt @@ -0,0 +1 @@ +This file prevents bisync from deleting empty directories. diff --git a/cmd/bisync/testdata/test_max_delete_path2_force/scenario.txt b/cmd/bisync/testdata/test_max_delete_path2_force/scenario.txt new file mode 100644 index 000000000..ee13aa4be --- /dev/null +++ b/cmd/bisync/testdata/test_max_delete_path2_force/scenario.txt @@ -0,0 +1,21 @@ +test max-delete-path2-force +# - Set up with 9 files. +# - Delete 5 files from *Path2*, causing max-delete error. +# - Run with --force to allow sync. + +test initial bisync +bisync resync + +test delete >50% of remote files +delete-file {path2/}file1.txt +delete-file {path2/}file2.txt +delete-file {path2/}file3.txt +delete-file {path2/}file4.txt +delete-file {path2/}file5.txt + +test sync should fail due to too many path2 deletes +bisync +copy-listings initial-fail + +test apply force option. sync should run. +bisync force diff --git a/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.copy1to2.que b/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.copy1to2.que new file mode 100644 index 000000000..7aec2196e --- /dev/null +++ b/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.copy1to2.que @@ -0,0 +1,2 @@ +"file1.txt" +"subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.copy2to1.que b/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.copy2to1.que new file mode 100644 index 000000000..4f4d13b98 --- /dev/null +++ b/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.copy2to1.que @@ -0,0 +1,2 @@ +"file2.txt" +"subdir/file21.txt" diff --git a/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..317d2cf5c --- /dev/null +++ b/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,6 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2001-01-02T00:00:00.000000000+0000 "subdir/file20.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file21.txt" diff --git a/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..4305c5420 --- /dev/null +++ b/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,6 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2001-01-02T00:00:00.000000000+0000 "subdir/file20.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file21.txt" diff --git a/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..1933dad81 --- /dev/null +++ b/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,6 @@ +# bisync listing v1 from test +- 109 md5:294d25b294ff26a5243dba914ac3fbf7 - 2000-01-01T00:00:00.000000000+0000 "RCLONE_TEST" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file1.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2001-01-02T00:00:00.000000000+0000 "subdir/file21.txt" diff --git a/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..6c638eaa5 --- /dev/null +++ b/cmd/bisync/testdata/test_rclone_args/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,6 @@ +# 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.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2001-01-02T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "subdir/file20.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2001-01-02T00:00:00.000000000+0000 "subdir/file21.txt" diff --git a/cmd/bisync/testdata/test_rclone_args/golden/test.log b/cmd/bisync/testdata/test_rclone_args/golden/test.log new file mode 100644 index 000000000..644cab613 --- /dev/null +++ b/cmd/bisync/testdata/test_rclone_args/golden/test.log @@ -0,0 +1,43 @@ +(01) : test rclone-args + + +(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-glob 2001-01-02 {datadir/} * + +(06) : copy-file {datadir/}file1.txt {path1/} +(07) : copy-file {datadir/}file2.txt {path2/} + +(08) : copy-file {datadir/}file20.txt {path1/}subdir +(09) : copy-file {datadir/}file21.txt {path2/}subdir + +(10) : test run bisync with custom options +(11) : bisync size-only +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File is newer - file1.txt +INFO : - Path1 File is newer - subdir/file20.txt +INFO : Path1: 2 changes: 0 new, 2 newer, 0 older, 0 deleted +INFO : Path2 checking for diffs +INFO : - Path2 File is newer - file2.txt +INFO : - Path2 File is newer - subdir/file21.txt +INFO : Path2: 2 changes: 0 new, 2 newer, 0 older, 0 deleted +INFO : Applying changes +INFO : - Path1 Queue copy to Path2 - {path2/}file1.txt +INFO : - Path1 Queue copy to Path2 - {path2/}subdir/file20.txt +INFO : - Path2 Queue copy to Path1 - {path1/}file2.txt +INFO : - Path2 Queue copy to Path1 - {path1/}subdir/file21.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 diff --git a/cmd/bisync/testdata/test_rclone_args/initial/RCLONE_TEST b/cmd/bisync/testdata/test_rclone_args/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_rclone_args/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_rclone_args/initial/file1.txt b/cmd/bisync/testdata/test_rclone_args/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_rclone_args/initial/file2.txt b/cmd/bisync/testdata/test_rclone_args/initial/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_rclone_args/initial/subdir/file20.txt b/cmd/bisync/testdata/test_rclone_args/initial/subdir/file20.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_rclone_args/initial/subdir/file21.txt b/cmd/bisync/testdata/test_rclone_args/initial/subdir/file21.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_rclone_args/modfiles/file1.txt b/cmd/bisync/testdata/test_rclone_args/modfiles/file1.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_rclone_args/modfiles/file1.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_rclone_args/modfiles/file2.txt b/cmd/bisync/testdata/test_rclone_args/modfiles/file2.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_rclone_args/modfiles/file2.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_rclone_args/modfiles/file20.txt b/cmd/bisync/testdata/test_rclone_args/modfiles/file20.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_rclone_args/modfiles/file21.txt b/cmd/bisync/testdata/test_rclone_args/modfiles/file21.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_rclone_args/scenario.txt b/cmd/bisync/testdata/test_rclone_args/scenario.txt new file mode 100644 index 000000000..6cb3162bb --- /dev/null +++ b/cmd/bisync/testdata/test_rclone_args/scenario.txt @@ -0,0 +1,23 @@ +test rclone-args +# Pass generic flags to rclone under test using as an example +# the --size-only flag, which changes the meaning of operations. +# Note that --size-only is honored by the rclone proper, but not bisync. +# Bisync copies the newer {path2/}file21.txt to {path1/}, but `rlcone sync` +# does not copy the newer {path1/}file20.txt to {path2/}. + +test initial bisync +bisync resync + +test place newer files on both paths + +# force specific modification time since file time is lost through git +touch-glob 2001-01-02 {datadir/} * + +copy-file {datadir/}file1.txt {path1/} +copy-file {datadir/}file2.txt {path2/} + +copy-file {datadir/}file20.txt {path1/}subdir +copy-file {datadir/}file21.txt {path2/}subdir + +test run bisync with custom options +bisync size-only diff --git a/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.path1.lst-err b/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.path1.lst-err new file mode 100644 index 000000000..565120782 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.path1.lst-err @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2002-02-02T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 1999-09-09T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..565120782 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2002-02-02T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 1999-09-09T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.path2.lst-err b/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.path2.lst-err new file mode 100644 index 000000000..565120782 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.path2.lst-err @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2002-02-02T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 1999-09-09T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..4f98654dc --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1 @@ +# bisync listing v1 from test diff --git a/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.resync-copy2to1.que b/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.resync-copy2to1.que new file mode 100644 index 000000000..a5b6f9f63 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/_testdir_path1.._testdir_path2.resync-copy2to1.que @@ -0,0 +1,2 @@ +"file2.txt" +"file4.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.path1.lst @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..4f98654dc --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1 @@ +# bisync listing v1 from test diff --git a/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.path2.lst @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.path2.lst-new @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.resync-copy2to1.que b/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.resync-copy2to1.que new file mode 100644 index 000000000..e999f575d --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/empty-path1._testdir_path1.._testdir_path2.resync-copy2to1.que @@ -0,0 +1,8 @@ +"RCLONE_TEST" +"file1.txt" +"file2.txt" +"file3.txt" +"file4.txt" +"file5.txt" +"file6.txt" +"file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/empty-path2._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_resync/golden/empty-path2._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/empty-path2._testdir_path1.._testdir_path2.path1.lst @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/empty-path2._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_resync/golden/empty-path2._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/empty-path2._testdir_path1.._testdir_path2.path1.lst-new @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/empty-path2._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_resync/golden/empty-path2._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..8ff472b60 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/empty-path2._testdir_path1.._testdir_path2.path2.lst @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/empty-path2._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_resync/golden/empty-path2._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..4f98654dc --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/empty-path2._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1 @@ +# bisync listing v1 from test diff --git a/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..565120782 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.path1.lst @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2002-02-02T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 1999-09-09T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..650fcc1a7 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,7 @@ +# 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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 1999-09-09T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..565120782 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.path2.lst @@ -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.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file2.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2002-02-02T00:00:00.000000000+0000 "file4.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 1999-09-09T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..26f56859a --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,8 @@ +# 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 "file2.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2002-02-02T00:00:00.000000000+0000 "file3.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2002-02-02T00:00:00.000000000+0000 "file4.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 1999-09-09T00:00:00.000000000+0000 "file5.txt" +- 19 md5:7fe98ed88552b828777d8630900346b8 - 2002-02-02T00:00:00.000000000+0000 "file6.txt" +- 0 md5:d41d8cd98f00b204e9800998ecf8427e - 2000-01-01T00:00:00.000000000+0000 "file7.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.resync-copy2to1.que b/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.resync-copy2to1.que new file mode 100644 index 000000000..a5b6f9f63 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/mixed-diffs._testdir_path1.._testdir_path2.resync-copy2to1.que @@ -0,0 +1,2 @@ +"file2.txt" +"file4.txt" diff --git a/cmd/bisync/testdata/test_resync/golden/test.log b/cmd/bisync/testdata/test_resync/golden/test.log new file mode 100644 index 000000000..1c60be8a8 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/golden/test.log @@ -0,0 +1,91 @@ +(01) : test resync + + +(02) : test 1. resync with empty path1, resulting in copying all content from path2. +(03) : purge-children {path1/} +(04) : bisync resync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Copying unique Path2 files to Path1 +INFO : - Path2 Resync will copy to Path1 - RCLONE_TEST +INFO : - Path2 Resync will copy to Path1 - file1.txt +INFO : - Path2 Resync will copy to Path1 - file2.txt +INFO : - Path2 Resync will copy to Path1 - file3.txt +INFO : - Path2 Resync will copy to Path1 - file4.txt +INFO : - Path2 Resync will copy to Path1 - file5.txt +INFO : - Path2 Resync will copy to Path1 - file6.txt +INFO : - Path2 Resync will copy to Path1 - file7.txt +INFO : - Path2 Resync is doing queued copies to - Path1 +INFO : Resynching Path1 to Path2 +INFO : Resync updating listings +INFO : Bisync successful +(05) : move-listings empty-path1 + +(06) : test 2. resync with empty path2, resulting in synching all content to path2. +(07) : purge-children {path2/} +(08) : 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 +(09) : move-listings empty-path2 + +(10) : test 3. exercise all of the various file difference scenarios during a resync. +(11) : touch-glob 2002-02-02 {datadir/} fileA.txt +(12) : touch-glob 1999-09-09 {datadir/} fileB.txt + +(13) : test = file - path1 - path2 - expected action - who wins +(14) : test - file1.txt - exists - missing - sync path1 > path2 - path1 +(15) : delete-file {path2/}file1.txt + +(16) : test - file2.txt - missing - exists - copy path2 > path1 - path2 +(17) : delete-file {path1/}file2.txt + +(18) : test - file3.txt - exists - newer date - sync path1 > path2 - path1 +(19) : copy-as {datadir/}fileA.txt {path2/} file3.txt + +(20) : test - file4.txt - missing - newer date - copy path2 > path1 - path2 +(21) : delete-file {path1/}file4.txt +(22) : copy-as {datadir/}fileA.txt {path2/} file4.txt + +(23) : test - file5.txt - exists - older date - sync path1 > path2 - path1 +(24) : copy-as {datadir/}fileB.txt {path2/} file5.txt + +(25) : test - file6.txt - older date - newer date - sync path1 > path2 - path1 +(26) : copy-as {datadir/}fileB.txt {path1/} file6.txt +(27) : copy-as {datadir/}fileA.txt {path2/} file6.txt + +(28) : test - file7.txt - exists - exists (same) - none - same + +(29) : test run bisync with resync +(30) : bisync resync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Copying unique Path2 files to Path1 +INFO : - Path2 Resync will copy to Path1 - file2.txt +INFO : - Path2 Resync will copy to Path1 - file4.txt +INFO : - Path2 Resync is doing queued copies to - Path1 +INFO : Resynching Path1 to Path2 +INFO : Resync updating listings +INFO : Bisync successful +(31) : copy-listings mixed-diffs + +(32) : test run normal bisync +(33) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful + +(34) : test 4. confirm critical error on normal sync of empty path. +(35) : purge-children {path2/} +(36) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +ERROR : Empty current Path2 listing. Cannot sync to an empty directory: {workdir/}{session}.path2.lst-new +ERROR : Bisync critical error: empty current Path2 listing: {workdir/}{session}.path2.lst-new +ERROR : Bisync aborted. Must run --resync to recover. +Bisync error: bisync aborted diff --git a/cmd/bisync/testdata/test_resync/initial/RCLONE_TEST b/cmd/bisync/testdata/test_resync/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_resync/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_resync/initial/file1.txt b/cmd/bisync/testdata/test_resync/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_resync/initial/file2.txt b/cmd/bisync/testdata/test_resync/initial/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_resync/initial/file3.txt b/cmd/bisync/testdata/test_resync/initial/file3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_resync/initial/file4.txt b/cmd/bisync/testdata/test_resync/initial/file4.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_resync/initial/file5.txt b/cmd/bisync/testdata/test_resync/initial/file5.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_resync/initial/file6.txt b/cmd/bisync/testdata/test_resync/initial/file6.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_resync/initial/file7.txt b/cmd/bisync/testdata/test_resync/initial/file7.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_resync/modfiles/fileA.txt b/cmd/bisync/testdata/test_resync/modfiles/fileA.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/modfiles/fileA.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_resync/modfiles/fileB.txt b/cmd/bisync/testdata/test_resync/modfiles/fileB.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/modfiles/fileB.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_resync/scenario.txt b/cmd/bisync/testdata/test_resync/scenario.txt new file mode 100644 index 000000000..078254646 --- /dev/null +++ b/cmd/bisync/testdata/test_resync/scenario.txt @@ -0,0 +1,61 @@ +test resync +# 1. Resync with empty Path1, resulting in copying all content FROM Path2 +# 2. Resync with empty Path2, resulting in synching all content TO Path2 +# 3. Exercise all of the various file difference scenarios during a resync: +# File Path1 Path2 Expected action Who wins +# - file1.txt Exists Missing Sync Path1 >Path2 Path1 +# - file2.txt Missing Exists Copy Path2 >Path1 Path2 +# - file3.txt Exists Newer date Sync Path1 >Path2 Path1 +# - file4.txt Missing Newer date Copy Path2 >Path1 Path2 +# - file5.txt Exists Older date Sync Path1 >Path2 Path1 +# - file6.txt Older date Newer date Sync Path1 >Path2 Path1 +# - file7.txt Exists Exists (same) None Same +# 4. Confirm critical error on a normal sync of empty path + +test 1. resync with empty path1, resulting in copying all content from path2. +purge-children {path1/} +bisync resync +move-listings empty-path1 + +test 2. resync with empty path2, resulting in synching all content to path2. +purge-children {path2/} +bisync resync +move-listings empty-path2 + +test 3. exercise all of the various file difference scenarios during a resync. +touch-glob 2002-02-02 {datadir/} fileA.txt +touch-glob 1999-09-09 {datadir/} fileB.txt + +test = file - path1 - path2 - expected action - who wins +test - file1.txt - exists - missing - sync path1 > path2 - path1 +delete-file {path2/}file1.txt + +test - file2.txt - missing - exists - copy path2 > path1 - path2 +delete-file {path1/}file2.txt + +test - file3.txt - exists - newer date - sync path1 > path2 - path1 +copy-as {datadir/}fileA.txt {path2/} file3.txt + +test - file4.txt - missing - newer date - copy path2 > path1 - path2 +delete-file {path1/}file4.txt +copy-as {datadir/}fileA.txt {path2/} file4.txt + +test - file5.txt - exists - older date - sync path1 > path2 - path1 +copy-as {datadir/}fileB.txt {path2/} file5.txt + +test - file6.txt - older date - newer date - sync path1 > path2 - path1 +copy-as {datadir/}fileB.txt {path1/} file6.txt +copy-as {datadir/}fileA.txt {path2/} file6.txt + +test - file7.txt - exists - exists (same) - none - same + +test run bisync with resync +bisync resync +copy-listings mixed-diffs + +test run normal bisync +bisync + +test 4. confirm critical error on normal sync of empty path. +purge-children {path2/} +bisync diff --git a/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.delete2.que b/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.delete2.que new file mode 100644 index 000000000..a49deb16c --- /dev/null +++ b/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.delete2.que @@ -0,0 +1 @@ +"subdir/file20.txt" diff --git a/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.path1.lst b/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.path1.lst new file mode 100644 index 000000000..dfacfb520 --- /dev/null +++ b/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.path1.lst @@ -0,0 +1,8 @@ +# 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" diff --git a/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.path1.lst-new b/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.path1.lst-new new file mode 100644 index 000000000..dfacfb520 --- /dev/null +++ b/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.path1.lst-new @@ -0,0 +1,8 @@ +# 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" diff --git a/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.path2.lst b/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.path2.lst new file mode 100644 index 000000000..dfacfb520 --- /dev/null +++ b/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.path2.lst @@ -0,0 +1,8 @@ +# 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" diff --git a/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.path2.lst-new b/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.path2.lst-new new file mode 100644 index 000000000..dfacfb520 --- /dev/null +++ b/cmd/bisync/testdata/test_rmdirs/golden/_testdir_path1.._testdir_path2.path2.lst-new @@ -0,0 +1,8 @@ +# 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" diff --git a/cmd/bisync/testdata/test_rmdirs/golden/test.log b/cmd/bisync/testdata/test_rmdirs/golden/test.log new file mode 100644 index 000000000..936af897b --- /dev/null +++ b/cmd/bisync/testdata/test_rmdirs/golden/test.log @@ -0,0 +1,50 @@ +(01) : test rmdirs + + +(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 1. delete path1 subdir file +(05) : delete-file {path1/}subdir/file20.txt + +(06) : test 2. run bisync without remove-empty-dirs +(07) : bisync +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : - Path1 File was deleted - subdir/file20.txt +INFO : Path1: 1 changes: 0 new, 0 newer, 0 older, 1 deleted +INFO : Path2 checking for diffs +INFO : Applying changes +INFO : - Path2 Queue delete - {path2/}subdir/file20.txt +INFO : - Do queued deletes on - Path2 +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Bisync successful + +(08) : test 3. confirm the subdir still exists on both paths +(09) : list-dirs {path1/} +subdir/ +(10) : list-dirs {path2/} +subdir/ + +(11) : test 4. run bisync with remove-empty-dirs +(12) : bisync remove-empty-dirs +INFO : Synching Path1 "{path1/}" with Path2 "{path2/}" +INFO : Path1 checking for diffs +INFO : Path2 checking for diffs +INFO : No changes found +INFO : Updating listings +INFO : Validating listings for Path1 "{path1/}" vs Path2 "{path2/}" +INFO : Removing empty directories +INFO : subdir: Removing directory +INFO : subdir: Removing directory +INFO : Bisync successful + +(13) : test 5. confirm the subdir has been removed on both paths +(14) : list-dirs {path1/} +(15) : list-dirs {path2/} diff --git a/cmd/bisync/testdata/test_rmdirs/initial/RCLONE_TEST b/cmd/bisync/testdata/test_rmdirs/initial/RCLONE_TEST new file mode 100644 index 000000000..d8ca97c2a --- /dev/null +++ b/cmd/bisync/testdata/test_rmdirs/initial/RCLONE_TEST @@ -0,0 +1 @@ +This file is used for testing the health of rclone accesses to the local/remote file system. Do not delete. diff --git a/cmd/bisync/testdata/test_rmdirs/initial/file1.copy1.txt b/cmd/bisync/testdata/test_rmdirs/initial/file1.copy1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_rmdirs/initial/file1.copy2.txt b/cmd/bisync/testdata/test_rmdirs/initial/file1.copy2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_rmdirs/initial/file1.copy3.txt b/cmd/bisync/testdata/test_rmdirs/initial/file1.copy3.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_rmdirs/initial/file1.copy4.txt b/cmd/bisync/testdata/test_rmdirs/initial/file1.copy4.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_rmdirs/initial/file1.copy5.txt b/cmd/bisync/testdata/test_rmdirs/initial/file1.copy5.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_rmdirs/initial/file1.txt b/cmd/bisync/testdata/test_rmdirs/initial/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_rmdirs/initial/subdir/file20.txt b/cmd/bisync/testdata/test_rmdirs/initial/subdir/file20.txt new file mode 100644 index 000000000..e69de29bb diff --git a/cmd/bisync/testdata/test_rmdirs/modfiles/file1.txt b/cmd/bisync/testdata/test_rmdirs/modfiles/file1.txt new file mode 100644 index 000000000..464147f09 --- /dev/null +++ b/cmd/bisync/testdata/test_rmdirs/modfiles/file1.txt @@ -0,0 +1 @@ +This file is newer diff --git a/cmd/bisync/testdata/test_rmdirs/scenario.txt b/cmd/bisync/testdata/test_rmdirs/scenario.txt new file mode 100644 index 000000000..d0c7a794b --- /dev/null +++ b/cmd/bisync/testdata/test_rmdirs/scenario.txt @@ -0,0 +1,31 @@ +test rmdirs +# Test the --remove-empty-dirs logic. +# Without this flag the subdir should not be deleted when empty, +# and deleted with the flag. +# +# After the initial setup sync: +# 1. Delete Path1 subdir/file20.txt +# 2. Run bisync without --remove-empty-dirs +# 3. Confirm the subdir still exists on both paths +# 4. Run bisync WITH --remove-empty-dirs +# 5. Confirm the subdir has been removed on both paths + +test initial bisync +bisync resync + +test 1. delete path1 subdir file +delete-file {path1/}subdir/file20.txt + +test 2. run bisync without remove-empty-dirs +bisync + +test 3. confirm the subdir still exists on both paths +list-dirs {path1/} +list-dirs {path2/} + +test 4. run bisync with remove-empty-dirs +bisync remove-empty-dirs + +test 5. confirm the subdir has been removed on both paths +list-dirs {path1/} +list-dirs {path2/}