diff options
author | Joas Schilling <coding@schilljs.com> | 2017-06-12 10:52:48 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-07-05 13:02:16 +0200 |
commit | 0bff4f3f07a52e063abe5a50a9ef3ec3bb131e51 (patch) | |
tree | 0a3d3734642a1d76ebfd539328862cf63746f64d | |
parent | 4e5cd1efea7c522ebd763dd3b96eb5f8c0e8407b (diff) | |
download | nextcloud-server-0bff4f3f07a52e063abe5a50a9ef3ec3bb131e51.tar.gz nextcloud-server-0bff4f3f07a52e063abe5a50a9ef3ec3bb131e51.zip |
Fix the installer tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | lib/private/DB/MigrationService.php | 6 | ||||
-rw-r--r-- | tests/lib/InstallerTest.php | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/private/DB/MigrationService.php b/lib/private/DB/MigrationService.php index 44412a967fb..70f81d9c808 100644 --- a/lib/private/DB/MigrationService.php +++ b/lib/private/DB/MigrationService.php @@ -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}\""); } } diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php index a31c8826bd9..107b9dcb41f 100644 --- a/tests/lib/InstallerTest.php +++ b/tests/lib/InstallerTest.php @@ -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'; |