diff options
author | Robin Appelman <robin@icewind.nl> | 2015-11-27 22:57:47 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2015-11-27 22:57:47 +0100 |
commit | 4c4331982c5ca3eb3315e2154ba0564d02ca96b5 (patch) | |
tree | f454c7f5eb9444eea2a48bd6f0e01db798e784a8 /tests | |
parent | 99c28a6ce64075be0bda93b4d46759b18b06aca6 (diff) | |
parent | 816cd66b4b88a4aa7dbee51952e30abdfacc47da (diff) | |
download | nextcloud-server-4c4331982c5ca3eb3315e2154ba0564d02ca96b5.tar.gz nextcloud-server-4c4331982c5ca3eb3315e2154ba0564d02ca96b5.zip |
Merge pull request #20789 from owncloud/scanner-skip-not-available
Skip unavailable storages in scanner
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/files/etagtest.php | 2 | ||||
-rw-r--r-- | tests/lib/files/utils/scanner.php | 10 |
2 files changed, 6 insertions, 6 deletions
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); } } |