From ae71f80f4a3262e3f12de4c71af1cc388904425d Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 27 Nov 2015 14:02:50 +0100 Subject: Skip unavailable storages in scanner --- tests/lib/files/etagtest.php | 2 +- tests/lib/files/utils/scanner.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/lib/files/etagtest.php b/tests/lib/files/etagtest.php index 192768d04af..1b51030d4a3 100644 --- a/tests/lib/files/etagtest.php +++ b/tests/lib/files/etagtest.php @@ -59,7 +59,7 @@ class EtagTest extends \Test\TestCase { $files = array('/foo.txt', '/folder/bar.txt', '/folder/subfolder', '/folder/subfolder/qwerty.txt'); $originalEtags = $this->getEtags($files); - $scanner = new \OC\Files\Utils\Scanner($user1, \OC::$server->getDatabaseConnection()); + $scanner = new \OC\Files\Utils\Scanner($user1, \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); $scanner->backgroundScan('/'); $newEtags = $this->getEtags($files); diff --git a/tests/lib/files/utils/scanner.php b/tests/lib/files/utils/scanner.php index 5492774f42e..b731c6992e8 100644 --- a/tests/lib/files/utils/scanner.php +++ b/tests/lib/files/utils/scanner.php @@ -70,7 +70,7 @@ class Scanner extends \Test\TestCase { $storage->file_put_contents('foo.txt', 'qwerty'); $storage->file_put_contents('folder/bar.txt', 'qwerty'); - $scanner = new TestScanner('', \OC::$server->getDatabaseConnection()); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); $scanner->addMount($mount); $scanner->scan(''); @@ -92,7 +92,7 @@ class Scanner extends \Test\TestCase { $storage->file_put_contents('foo.txt', 'qwerty'); $storage->file_put_contents('folder/bar.txt', 'qwerty'); - $scanner = new TestScanner('', \OC::$server->getDatabaseConnection()); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); $scanner->addMount($mount); $scanner->scan(''); @@ -130,7 +130,7 @@ class Scanner extends \Test\TestCase { $storage->file_put_contents('foo.txt', 'qwerty'); $storage->file_put_contents('folder/bar.txt', 'qwerty'); - $scanner = new \OC\Files\Utils\Scanner($uid, \OC::$server->getDatabaseConnection()); + $scanner = new \OC\Files\Utils\Scanner($uid, \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); $this->assertFalse($cache->inCache('folder/bar.txt')); $scanner->scan('/' . $uid . '/files/foo'); @@ -152,7 +152,7 @@ class Scanner extends \Test\TestCase { $storage->file_put_contents('foo.txt', 'qwerty'); $storage->file_put_contents('folder/bar.txt', 'qwerty'); - $scanner = new TestScanner('', \OC::$server->getDatabaseConnection()); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); $originalPropagator = $scanner->getPropagator(); $scanner->setPropagator($propagator); $scanner->addMount($mount); @@ -214,7 +214,7 @@ class Scanner extends \Test\TestCase { * @param string $invalidPath */ public function testInvalidPathScanning($invalidPath) { - $scanner = new TestScanner('', \OC::$server->getDatabaseConnection()); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); $scanner->scan($invalidPath); } } -- cgit v1.2.3