[Pkg-owncloud-commits] [owncloud] 37/129: fix delete orphan shares test with object home storage

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 331750a3b7131f0338d0ab81998b2528b6b18dab
Author: Robin Appelman <icewind at owncloud.com>
Date:   Wed Oct 14 13:27:05 2015 +0200

    fix delete orphan shares test with object home storage
---
 apps/files/tests/command/deleteorphanedfilestest.php | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/apps/files/tests/command/deleteorphanedfilestest.php b/apps/files/tests/command/deleteorphanedfilestest.php
index 76fe9db..3a1a541 100644
--- a/apps/files/tests/command/deleteorphanedfilestest.php
+++ b/apps/files/tests/command/deleteorphanedfilestest.php
@@ -22,6 +22,7 @@
 namespace OCA\Files\Tests\Command;
 
 use OCA\Files\Command\DeleteOrphanedFiles;
+use OCP\Files\StorageNotAvailableException;
 
 class DeleteOrphanedFilesTest extends \Test\TestCase {
 
@@ -110,7 +111,11 @@ class DeleteOrphanedFilesTest extends \Test\TestCase {
 
 		$this->assertCount(0, $this->getFile($fileInfo->getId()), 'Asserts that file gets cleaned up');
 
-		$view->unlink('files/test');
+		// since we deleted the storage it might throw a (valid) StorageNotAvailableException
+		try {
+			$view->unlink('files/test');
+		} catch (StorageNotAvailableException $e) {
+		}
 	}
 }
 

-- 
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