summaryrefslogtreecommitdiffstats
path: root/tests/lib/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-11-27 14:02:50 +0100
committerRobin Appelman <icewind@owncloud.com>2015-11-27 14:02:50 +0100
commitae71f80f4a3262e3f12de4c71af1cc388904425d (patch)
treecded4fc50d739239a71da2c1e6b5cd1454103508 /tests/lib/files
parent8fe878afe9af165b98470a75203df2f1b32cb68f (diff)
downloadnextcloud-server-ae71f80f4a3262e3f12de4c71af1cc388904425d.tar.gz
nextcloud-server-ae71f80f4a3262e3f12de4c71af1cc388904425d.zip
Skip unavailable storages in scanner
Diffstat (limited to 'tests/lib/files')
-rw-r--r--tests/lib/files/etagtest.php2
-rw-r--r--tests/lib/files/utils/scanner.php10
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);
}
}