[Pkg-owncloud-commits] [owncloud] 34/129: dont assume home storage is local in trash test

David Prévot taffit at moszumanska.debian.org
Thu Nov 5 01:04:20 UTC 2015


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

taffit pushed a commit to branch stable8
in repository owncloud.

commit 4dd5efd464b3c527060652938f9bebd1c08287f0
Author: Robin Appelman <icewind at owncloud.com>
Date:   Tue Oct 13 12:19:07 2015 +0200

    dont assume home storage is local in trash test
---
 apps/files_trashbin/tests/trashbin.php | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/apps/files_trashbin/tests/trashbin.php b/apps/files_trashbin/tests/trashbin.php
index 757239b..f8e11b0 100644
--- a/apps/files_trashbin/tests/trashbin.php
+++ b/apps/files_trashbin/tests/trashbin.php
@@ -600,22 +600,24 @@ class Test_Trashbin extends \Test\TestCase {
 
 		// delete source folder
 		list($storage, $internalPath) = $this->rootView->resolvePath('/' . self::TEST_TRASHBIN_USER1 . '/files/folder');
-		$folderAbsPath = $storage->getSourcePath($internalPath);
-		// make folder read-only
-		chmod($folderAbsPath, 0555);
+		if ($storage instanceof \OC\Files\Storage\Local) {
+			$folderAbsPath = $storage->getSourcePath($internalPath);
+			// make folder read-only
+			chmod($folderAbsPath, 0555);
 
-		$this->assertTrue(
-			OCA\Files_Trashbin\Trashbin::restore(
-				'file1.txt.d' . $trashedFile->getMtime(),
-				$trashedFile->getName(),
-				$trashedFile->getMtime()
-			)
-		);
+			$this->assertTrue(
+				OCA\Files_Trashbin\Trashbin::restore(
+					'file1.txt.d' . $trashedFile->getMtime(),
+					$trashedFile->getName(),
+					$trashedFile->getMtime()
+				)
+			);
 
-		$file = $userFolder->get('file1.txt');
-		$this->assertEquals('foo', $file->getContent());
+			$file = $userFolder->get('file1.txt');
+			$this->assertEquals('foo', $file->getContent());
 
-		chmod($folderAbsPath, 0755);
+			chmod($folderAbsPath, 0755);
+		}
 	}
 
 	/**

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



More information about the Pkg-owncloud-commits mailing list