Browse Source

Fix the installer tests

Signed-off-by: Joas Schilling <coding@schilljs.com>
tags/v13.0.0beta1
Joas Schilling 7 years ago
parent
commit
0bff4f3f07
2 changed files with 11 additions and 1 deletions
  1. 5
    1
      lib/private/DB/MigrationService.php
  2. 6
    0
      tests/lib/InstallerTest.php

+ 5
- 1
lib/private/DB/MigrationService.php View File

@@ -78,9 +78,13 @@ class MigrationService {
$namespace = App::buildAppNamespace($appName);
$this->migrationsPath = "$appPath/lib/Migration";
$this->migrationsNamespace = $namespace . '\\Migration';

if (!@mkdir($appPath . '/lib') && !is_dir($appPath . '/lib')) {
throw new \RuntimeException("Could not create migration folder \"{$this->migrationsPath}\"");
}
}

if (!is_dir($this->migrationsPath) && !mkdir($this->migrationsPath)) {
if (!@mkdir($this->migrationsPath) && !is_dir($this->migrationsPath)) {
throw new \RuntimeException("Could not create migration folder \"{$this->migrationsPath}\"");
}
}

+ 6
- 0
tests/lib/InstallerTest.php View File

@@ -19,6 +19,12 @@ use OCP\IConfig;
use OCP\ILogger;
use OCP\ITempManager;

/**
* Class InstallerTest
*
* @package Test
* @group DB
*/
class InstallerTest extends TestCase {

private static $appid = 'testapp';

Loading…
Cancel
Save