[Pkg-owncloud-commits] [owncloud-client] 144/332: t7.pl: Test that deleting a directory restores it and all its sub directories
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Aug 14 21:06:52 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 9066ad579042e29abf2bd6f2f706ee604a0cc34b
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Fri Jun 27 11:31:35 2014 +0200
t7.pl: Test that deleting a directory restores it and all its sub directories
---
csync/tests/ownCloud/t7.pl | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/csync/tests/ownCloud/t7.pl b/csync/tests/ownCloud/t7.pl
index 8ce1533..ebaa5a4 100755
--- a/csync/tests/ownCloud/t7.pl
+++ b/csync/tests/ownCloud/t7.pl
@@ -46,6 +46,7 @@ printInfo( "Init" );
#create some files localy
my $tmpdir = "/tmp/t7/";
mkdir($tmpdir);
+createLocalFile( $tmpdir . "normalFile_PERM_WVND_.data", 100 );
createLocalFile( $tmpdir . "cannotBeRemoved_PERM_WVN_.data", 101 );
createLocalFile( $tmpdir . "canBeRemoved_PERM_D_.data", 102 );
my $md5CanotBeModified = createLocalFile( $tmpdir . "canotBeModified_PERM_DVN_.data", 103 );
@@ -56,6 +57,10 @@ createRemoteDir( "normalDirectory_PERM_CKDNV_" );
glob_put( "$tmpdir/*", "normalDirectory_PERM_CKDNV_" );
createRemoteDir( "readonlyDirectory_PERM_M_" );
glob_put( "$tmpdir/*", "readonlyDirectory_PERM_M_" );
+createRemoteDir( "readonlyDirectory_PERM_M_/subdir_PERM_CKDNV_" );
+createRemoteDir( "readonlyDirectory_PERM_M_/subdir_PERM_CKDNV_/subsubdir_PERM_CKDNV_" );
+glob_put( "$tmpdir/normalFile_PERM_WVND_.data", "readonlyDirectory_PERM_M_/subdir_PERM_CKDNV_/subsubdir_PERM_CKDNV_" );
+
csync();
assertLocalAndRemoteDir( '', 0);
@@ -139,6 +144,17 @@ assertLocalAndRemoteDir( '', 0);
+#######################################################################
+printInfo( "remove the read only directory" );
+# -> It must be recovered
+system("rm -r " . localDir().'readonlyDirectory_PERM_M_' );
+csync();
+assert( -e localDir(). 'readonlyDirectory_PERM_M_/cannotBeRemoved_PERM_WVN_.data' );
+assert( -e localDir(). 'readonlyDirectory_PERM_M_/subdir_PERM_CKDNV_/subsubdir_PERM_CKDNV_/normalFile_PERM_WVND_.data' );
+assertLocalAndRemoteDir( '', 0);
+
+
+
--
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