diff options
author | Michael Weimann <mail@michael-weimann.eu> | 2018-08-09 19:48:55 +0200 |
---|---|---|
committer | Michael Weimann <mail@michael-weimann.eu> | 2018-08-09 19:49:01 +0200 |
commit | 3f790bb85b3544680f4af2e3e005d736a5aff8a0 (patch) | |
tree | e7ce6422d05867d4ff4433f856f563e3fd66d227 /tests/Settings | |
parent | ebcfe33d0d0233dceaa80ad3a44126dee480eb97 (diff) | |
download | nextcloud-server-3f790bb85b3544680f4af2e3e005d736a5aff8a0.tar.gz nextcloud-server-3f790bb85b3544680f4af2e3e005d736a5aff8a0.zip |
Excludes not writable app roots from the directory permission check
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
Diffstat (limited to 'tests/Settings')
-rw-r--r-- | tests/Settings/Controller/CheckSetupControllerTest.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/Settings/Controller/CheckSetupControllerTest.php b/tests/Settings/Controller/CheckSetupControllerTest.php index 5bed7e322eb..677a2a0aa0b 100644 --- a/tests/Settings/Controller/CheckSetupControllerTest.php +++ b/tests/Settings/Controller/CheckSetupControllerTest.php @@ -629,6 +629,27 @@ class CheckSetupControllerTest extends TestCase { ); } + /** + * Calls the check for a none existing app root that is marked as not writable. + * It's expected that no error happens since the check shouldn't apply. + * + * @return void + */ + public function testAppDirectoryOwnersNotWritable() { + $tempDir = tempnam(sys_get_temp_dir(), 'apps') . 'dir'; + OC::$APPSROOTS = [ + [ + 'path' => $tempDir, + 'url' => '/apps', + 'writable' => false, + ], + ]; + $this->assertSame( + [], + $this->invokePrivate($this->checkSetupController, 'getAppDirsWithDifferentOwner') + ); + } + public function testIsBuggyNss400() { $this->config->expects($this->any()) ->method('getSystemValue') |