fix delete orphan shares test with object home storage

This commit is contained in:
Robin Appelman 2015-10-14 13:27:05 +02:00 committed by Thomas Müller
parent 54cea05271
commit 416da0dfe9

View file

@ -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) {
}
}
}