[Pkg-owncloud-commits] [owncloud-client] 309/332: tests: Fix t5: work with ownCloud 7 sharing.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Aug 14 21:07:16 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 fe2e4d87c5c46e944ab272bc1ef1575fac5884c8
Author: Klaas Freitag <freitag at owncloud.com>
Date: Wed Aug 6 17:19:02 2014 +0200
tests: Fix t5: work with ownCloud 7 sharing.
---
csync/tests/ownCloud/ownCloud/Test.pm | 15 ++++++++++++---
csync/tests/ownCloud/t5.pl | 19 +++++++++++++------
2 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/csync/tests/ownCloud/ownCloud/Test.pm b/csync/tests/ownCloud/ownCloud/Test.pm
index 3538d83..dafa5c9 100644
--- a/csync/tests/ownCloud/ownCloud/Test.pm
+++ b/csync/tests/ownCloud/ownCloud/Test.pm
@@ -609,13 +609,22 @@ sub md5OfFile( $ )
return $hash;
}
-sub moveRemoteFile($$)
+sub moveRemoteFile($$;$)
{
- my ($from, $to) = @_;
-
+ my ($from, $to, $no_testdir) = @_;
+
+ $d->credentials( -url=> $owncloud, -realm=>"ownCloud",
+ -user=> $user,
+ -pass=> $passwd );
+
my $fromUrl = testDirUrl(). $from;
my $toUrl = testDirUrl() . $to;
+ if( $no_testdir ) {
+ $fromUrl = $from;
+ $toUrl = $to;
+ }
+
$d->move($fromUrl, $toUrl);
}
diff --git a/csync/tests/ownCloud/t5.pl b/csync/tests/ownCloud/t5.pl
index fce39a0..4cb7e6c 100755
--- a/csync/tests/ownCloud/t5.pl
+++ b/csync/tests/ownCloud/t5.pl
@@ -33,6 +33,9 @@ print "Hello, this is t5, a tester for syncing of files in Shares\n";
initTesting();
+# Create empty test dirs.
+csync();
+
my $share_dir = "share_source";
printInfo( "Create a share." );
@@ -47,18 +50,22 @@ my $sharee = { user => configValue('share_user'),
# put a couple of files into the shared directory in the sharer account
glob_put( 'sharing/*', $share_dir, $sharee);
-# now user kf has a new directory in shared.
+# Move the shared dir remotely into the test dir, otherwise the script
+# has a hard time to find it.
+moveRemoteFile( server() . $share_dir, localDir(), 1 );
# call csync, sync local t1 to remote t1
printInfo("Initial sync, sync stuff down.");
-csync( server()."Shared" );
-assertLocalAndRemoteDir( 'Shared', 0, server() );
+csync();
+
+
+assertLocalAndRemoteDir( '', 0 );
# Local file to a read/write share should be synced up
printInfo("Put a file into the share.");
-createLocalFile( localDir(). $share_dir . "/foobar.txt", 8094 );
-csync( server()."Shared" );
-assertLocalAndRemoteDir( 'Shared', 0, server() );
+createLocalFile(localDir() . "$share_dir/foobar.txt", 8094 );
+csync( );
+assertLocalAndRemoteDir( '', 0 );
printInfo("Remove a Share.");
--
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