From: Olivier Goffart Date: Wed, 5 Sep 2018 16:36:53 +0000 (+0200) Subject: Fix tx.pl X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~505 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f0ddf179a5fc4b73c1a721d156f233d0cf84cc2c;p=nextcloud-desktop.git Fix tx.pl The conflict filename changed --- diff --git a/test/scripts/txpl/ownCloud/Test.pm b/test/scripts/txpl/ownCloud/Test.pm index 251164e2c..e5964dc9c 100644 --- a/test/scripts/txpl/ownCloud/Test.pm +++ b/test/scripts/txpl/ownCloud/Test.pm @@ -453,7 +453,7 @@ sub traverse( $$;$ ) $seen{$f."/"} = 3; } - $isHere = 1 if( $acceptConflicts && !$isHere && $f =~ /_conflict/ ); + $isHere = 1 if( $acceptConflicts && !$isHere && $f =~ /conflicted copy/ ); $isHere = 1 if( $f =~ /\.csync/ ); $isHere = 1 if( $f =~ /\._sync_/ ); assert( $isHere, "Filename local, but not remote: $f" ); diff --git a/test/scripts/txpl/t1.pl b/test/scripts/txpl/t1.pl index b4b2c4c1a..3b63d2a05 100755 --- a/test/scripts/txpl/t1.pl +++ b/test/scripts/txpl/t1.pl @@ -156,8 +156,8 @@ my $localMD5 = md5OfFile( localDir().'remoteToLocal1/kernelcrash.txt' ); my $realMD5 = md5OfFile( '/tmp/kernelcrash.txt' ); print "MD5 compare $localMD5 <-> $realMD5\n"; assert( $localMD5 eq $realMD5 ); -assert( glob(localDir().'remoteToLocal1/kernelcrash_conflict-*.txt' ) ); -system("rm " . localDir().'remoteToLocal1/kernelcrash_conflict-*.txt' ); +assert( glob(localDir().'remoteToLocal1/kernelcrash*conflicted*copy*.txt' ) ); +system("rm " . localDir().'remoteToLocal1/kernelcrash*conflicted*copy*.txt' ); # prepare test for issue 1329, rtlX need to be modified diff --git a/test/scripts/txpl/t4.pl b/test/scripts/txpl/t4.pl index aeccd2a76..23a0720e0 100755 --- a/test/scripts/txpl/t4.pl +++ b/test/scripts/txpl/t4.pl @@ -107,23 +107,23 @@ assert( $localMD5 eq $realMD5 ); printInfo("Added a file that is on the ignore list"); # (*.directory is in the ignored list that needs cleanup) -# (it is names with _conflict) because i want the conflicft detection of assertLocalAndRemoteDir to work -system( "echo dir >> " . localDir() . 'test_stat/file_conflict.directory' ); +# (it is names with conflicted copy) because i want the conflicft detection of assertLocalAndRemoteDir to work +system( "echo dir >> " . localDir() . 'test_stat/file_conflicted\ copy.directory' ); # this one should retain the directory -system( "echo foobarfoo > " . localDir() . 'test_ignored/sub/ignored_conflict.part' ); +system( "echo foobarfoo > " . localDir() . 'test_ignored/sub/ignored_conflicted\ copy.part' ); csync(); -# The file_conflict.directory is seen as a conflict +# The file_conflicted\ copy.directory is seen as a conflict assertLocalAndRemoteDir( '', 1 ); -# TODO: check that the file_conflict.directory is indeed NOT on the server -# TODO: check that test_ignored/sub/ignored_conflict.part is NOT on the server -assert(-e localDir() . 'test_ignored/sub/ignored_conflict.part'); +# TODO: check that the file_conflicted\ copy.directory is indeed NOT on the server +# TODO: check that test_ignored/sub/ignored_conflicted\ copy.part is NOT on the server +assert(-e localDir() . 'test_ignored/sub/ignored_conflicted copy.part'); printInfo("Remove a directory containing an ignored file that should not be removed\n"); remoteCleanup('test_ignored'); csync(); -assert(-e localDir() . 'test_ignored/sub/ignored_conflict.part'); +assert(-e localDir() . 'test_ignored/sub/ignored_conflicted copy.part'); #remove the file so next sync allow the directory to be removed -system( "rm " . localDir() . 'test_ignored/sub/ignored_conflict.part' ); +system( "rm " . localDir() . 'test_ignored/sub/ignored_conflicted\ copy.part' ); printInfo("Remove a directory containing a local file\n"); remoteCleanup('test_stat'); diff --git a/test/scripts/txpl/t6.pl b/test/scripts/txpl/t6.pl index cc9f73e7c..2b97c44f1 100755 --- a/test/scripts/txpl/t6.pl +++ b/test/scripts/txpl/t6.pl @@ -127,7 +127,7 @@ my $secondETag = getETagFromJournal('BIG3.file', 'Second'); my $seen = 0; opendir(my $dh, localDir() ); while(readdir $dh) { - $seen = 1 if ( /BIG3_conflict.*\.file/ ); + $seen = 1 if ( /BIG3.*conflicted copy.*\.file/ ); } closedir $dh; assert( $seen == 1, "No conflict file created on precondition failed!" );