[Pkg-owncloud-commits] [owncloud-client] 315/332: tests: Some more tests with local files and shares.

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Aug 14 21:07:17 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit e71ce01f90f99ce70bb5bce04b05d59ceebb6456
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Thu Aug 7 12:13:40 2014 +0200

    tests: Some more tests with local files and shares.
---
 csync/tests/ownCloud/t5.pl | 32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/csync/tests/ownCloud/t5.pl b/csync/tests/ownCloud/t5.pl
index 4cb7e6c..b764e6d 100755
--- a/csync/tests/ownCloud/t5.pl
+++ b/csync/tests/ownCloud/t5.pl
@@ -44,9 +44,9 @@ print "Created share with id <$shareId>\n";
 
 assert( $shareId > 0 );
 
-my $sharee = { user => configValue('share_user'),
+my $sharee = { user   => configValue('share_user'),
                passwd => configValue('share_passwd'),
-	       url => server() };
+	       url    => server() };
 # put a couple of files into the shared directory in the sharer account
 glob_put( 'sharing/*', $share_dir, $sharee);
 
@@ -67,6 +67,34 @@ createLocalFile(localDir() . "$share_dir/foobar.txt", 8094 );
 csync( );
 assertLocalAndRemoteDir( '', 0 );
 
+# now move the file locally and sync
+printInfo("Move the file locally and sync.");
+my $cmd = "mv " . localDir() . "$share_dir/foobar.txt ". localDir() . "$share_dir/moved_file.txt";
+system( $cmd );
+csync( );
+assertLocalAndRemoteDir( '', 0 );
+
+# now create aother directory and redo
+printInfo("Create another directory and file");
+my $cmd = "mkdir ". localDir() . "$share_dir/newDir";
+system( $cmd );
+createLocalFile( localDir() . "$share_dir/newDir/a_file.bin", 5321 );
+csync( );
+assertLocalAndRemoteDir( '', 0 );
+
+# Remove the local file again
+printInfo("Remove the local file again.");
+unlink( localDir() . "$share_dir/newDir/a_file.bin" );
+csync( );
+assertLocalAndRemoteDir( '', 0 );
+
+# Remove the local directory again
+printInfo("Remove the local directory again.");
+rmdir( localDir() . "$share_dir/newDir" );
+csync( );
+assertLocalAndRemoteDir( '', 0 );
+
+
 
 printInfo("Remove a Share.");
 removeShare($shareId, $share_dir);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list