Fix tx.pl
authorOlivier Goffart <ogoffart@woboq.com>
Wed, 5 Sep 2018 16:36:53 +0000 (18:36 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:06 +0000 (10:58 +0100)
The conflict filename changed

test/scripts/txpl/ownCloud/Test.pm
test/scripts/txpl/t1.pl
test/scripts/txpl/t4.pl
test/scripts/txpl/t6.pl

index 251164e2c1b452771c1ca4cf6986f1977e12e878..e5964dc9cabf1510388e5585c224a2beedac1aff 100644 (file)
@@ -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" );
index b4b2c4c1a1459f6fb90f6d8592c6f8ecf4f63cae..3b63d2a050b21f0709f26facddf79efe0d059e9f 100755 (executable)
@@ -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
index aeccd2a767005ebeef0208dd1189626e59623994..23a0720e0a26d0e9e6a1aaa2510fd2131e252569 100755 (executable)
@@ -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');
index cc9f73e7cd38b43148e703715aadf992ba39f150..2b97c44f17c3c53d1f3b4c05dcccb23e340241da 100755 (executable)
@@ -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!" );