Skip to content
Snippets Groups Projects
Unverified Commit 601362e1 authored by Robin Appelman's avatar Robin Appelman
Browse files

adjust to moved repair step


Signed-off-by: default avatarRobin Appelman <robin@icewind.nl>
parent 846e62c2
No related branches found
No related tags found
No related merge requests found
...@@ -145,7 +145,7 @@ class Repair implements IOutput{ ...@@ -145,7 +145,7 @@ class Repair implements IOutput{
\OC::$server->getConfig(), \OC::$server->getConfig(),
\OC::$server->query(Installer::class) \OC::$server->query(Installer::class)
), ),
new RepairInvalidPaths(\OC::$server->getDatabaseConnection()) new RepairInvalidPaths(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig())
]; ];
} }
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
namespace OC\Repair\NC13; namespace OC\Repair\NC13;
use OCP\IConfig;
use OCP\IDBConnection; use OCP\IDBConnection;
use OCP\Migration\IOutput; use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep; use OCP\Migration\IRepairStep;
...@@ -29,9 +30,12 @@ use OCP\Migration\IRepairStep; ...@@ -29,9 +30,12 @@ use OCP\Migration\IRepairStep;
class RepairInvalidPaths implements IRepairStep { class RepairInvalidPaths implements IRepairStep {
/** @var IDBConnection */ /** @var IDBConnection */
private $connection; private $connection;
/** @var IConfig */
private $config;
public function __construct(IDBConnection $connection) { public function __construct(IDBConnection $connection, IConfig $config) {
$this->connection = $connection; $this->connection = $connection;
$this->config = $config;
} }
......
...@@ -23,7 +23,8 @@ namespace Test\Repair; ...@@ -23,7 +23,8 @@ namespace Test\Repair;
use OC\Files\Cache\Cache; use OC\Files\Cache\Cache;
use OC\Files\Storage\Temporary; use OC\Files\Storage\Temporary;
use OC\Repair\RepairInvalidPaths; use OC\Repair\NC13\RepairInvalidPaths;
use OCP\IConfig;
use OCP\Migration\IOutput; use OCP\Migration\IOutput;
use Test\TestCase; use Test\TestCase;
...@@ -43,7 +44,12 @@ class RepairInvalidPathsTest extends TestCase { ...@@ -43,7 +44,12 @@ class RepairInvalidPathsTest extends TestCase {
$this->storage = new Temporary(); $this->storage = new Temporary();
$this->cache = $this->storage->getCache(); $this->cache = $this->storage->getCache();
$this->repair = new RepairInvalidPaths(\OC::$server->getDatabaseConnection()); $config = $this->createMock(IConfig::class);
$config->expects($this->any())
->method('getSystemValue')
->with('version', '0.0.0')
->willReturn('12.0.0.0');
$this->repair = new RepairInvalidPaths(\OC::$server->getDatabaseConnection(), $config);
} }
protected function tearDown() { protected function tearDown() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment