summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-11-27 14:02:50 +0100
committerRobin Appelman <icewind@owncloud.com>2015-12-21 16:21:13 +0100
commit188857c6914a05b3f1192a597d92af83480dd45e (patch)
tree1dbb809e46d3ae04233b986d9bdfc232a3b8b5b8 /tests
parentd60d903e75296950a52a0e25c7cd31f5b55ab68f (diff)
downloadnextcloud-server-188857c6914a05b3f1192a597d92af83480dd45e.tar.gz
nextcloud-server-188857c6914a05b3f1192a597d92af83480dd45e.zip
Skip unavailable storages in scanner
Diffstat (limited to 'tests')
-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 1a11b29cf00..ea1cd045590 100644
--- a/tests/lib/files/etagtest.php
+++ b/tests/lib/files/etagtest.php
@@ -60,7 +60,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);
}
}