Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weimann <mail@michael-weimann.eu>2018-08-09 20:48:55 +0300
committerMichael Weimann <mail@michael-weimann.eu>2018-08-09 20:49:01 +0300
commit3f790bb85b3544680f4af2e3e005d736a5aff8a0 (patch)
treee7ce6422d05867d4ff4433f856f563e3fd66d227 /tests/Settings
parentebcfe33d0d0233dceaa80ad3a44126dee480eb97 (diff)
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.php21
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')