summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorSimon L <szaimen@e.mail.de>2023-09-04 12:05:36 +0200
committerGitHub <noreply@github.com>2023-09-04 12:05:36 +0200
commit489a57e9a382ac72ee46d8740506f4e8f607d131 (patch)
tree575b535e7d1c2565eec7752d729957a1bae648b6 /tests/lib
parent373f3f6d3edfb080a909c061d7874869d9f7cbb0 (diff)
parent8d1a3daa3fd7d1a4ecb7934662a76266a02ce225 (diff)
downloadnextcloud-server-489a57e9a382ac72ee46d8740506f4e8f607d131.tar.gz
nextcloud-server-489a57e9a382ac72ee46d8740506f4e8f607d131.zip
Merge pull request #39707 from nextcloud/bugfix/39706/local-ext-storage-unavailable-mode
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/Files/Storage/LocalTest.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib/Files/Storage/LocalTest.php b/tests/lib/Files/Storage/LocalTest.php
index e324d2b28db..1190a2b2da0 100644
--- a/tests/lib/Files/Storage/LocalTest.php
+++ b/tests/lib/Files/Storage/LocalTest.php
@@ -139,4 +139,15 @@ class LocalTest extends Storage {
umask($oldMask);
$this->assertTrue($this->instance->isUpdatable('test.txt'));
}
+
+ public function testUnavailableExternal() {
+ $this->expectException(\OCP\Files\StorageNotAvailableException::class);
+ $this->instance = new \OC\Files\Storage\Local(['datadir' => $this->tmpDir . '/unexist', 'isExternal' => true]);
+ }
+
+ public function testUnavailableNonExternal() {
+ $this->instance = new \OC\Files\Storage\Local(['datadir' => $this->tmpDir . '/unexist']);
+ // no exception thrown
+ $this->assertNotNull($this->instance);
+ }
}