From 416da0dfe9af2701f0298a9ef2f9c24600deb1ab Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 14 Oct 2015 13:27:05 +0200 Subject: [PATCH] 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 76fe9dbdfa0..3a1a541d8f1 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) { + } } }