Fix the installer tests

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-06-12 10:52:48 +02:00 committed by Morris Jobke
parent 4e5cd1efea
commit 0bff4f3f07
2 changed files with 11 additions and 1 deletions

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}\"");
}
}

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';