summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-02-23 18:29:08 +0100
committerRobin Appelman <robin@icewind.nl>2022-03-04 16:29:59 +0100
commit1c468129afa2b2ec4a370a879f8eaffd22768baf (patch)
tree1c096e8c0a62371965104684e1f1bf2ef55eb2d4 /lib
parent5c0fe934988960ece3ac71d5a1dfc8df405413aa (diff)
downloadnextcloud-server-1c468129afa2b2ec4a370a879f8eaffd22768baf.tar.gz
nextcloud-server-1c468129afa2b2ec4a370a879f8eaffd22768baf.zip
adjust tests to new fs setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/composer/composer/autoload_classmap.php2
-rw-r--r--lib/composer/composer/autoload_static.php2
-rw-r--r--lib/private/Files/Filesystem.php4
-rw-r--r--lib/private/Files/Node/Root.php4
-rw-r--r--lib/private/Files/SetupManager.php4
-rw-r--r--lib/public/Files/Events/Node/FilesystemTornDownEvent.php32
6 files changed, 40 insertions, 8 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index 59f4c11843c..6af6559af11 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -271,7 +271,7 @@ return array(
'OCP\\Files\\Events\\Node\\BeforeNodeRenamedEvent' => $baseDir . '/lib/public/Files/Events/Node/BeforeNodeRenamedEvent.php',
'OCP\\Files\\Events\\Node\\BeforeNodeTouchedEvent' => $baseDir . '/lib/public/Files/Events/Node/BeforeNodeTouchedEvent.php',
'OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent' => $baseDir . '/lib/public/Files/Events/Node/BeforeNodeWrittenEvent.php',
- 'OCP\\Files\\Events\\Node\\FilesystemTearedDownEvent' => $baseDir . '/lib/public/Files/Events/Node/FilesystemTearedDownEvent.php',
+ 'OCP\\Files\\Events\\Node\\FilesystemTornDownEvent' => $baseDir . '/lib/public/Files/Events/Node/FilesystemTornDownEvent.php',
'OCP\\Files\\Events\\Node\\NodeCopiedEvent' => $baseDir . '/lib/public/Files/Events/Node/NodeCopiedEvent.php',
'OCP\\Files\\Events\\Node\\NodeCreatedEvent' => $baseDir . '/lib/public/Files/Events/Node/NodeCreatedEvent.php',
'OCP\\Files\\Events\\Node\\NodeDeletedEvent' => $baseDir . '/lib/public/Files/Events/Node/NodeDeletedEvent.php',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index 2437fb0a9aa..69b00b4e2e7 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -300,7 +300,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OCP\\Files\\Events\\Node\\BeforeNodeRenamedEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Events/Node/BeforeNodeRenamedEvent.php',
'OCP\\Files\\Events\\Node\\BeforeNodeTouchedEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Events/Node/BeforeNodeTouchedEvent.php',
'OCP\\Files\\Events\\Node\\BeforeNodeWrittenEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Events/Node/BeforeNodeWrittenEvent.php',
- 'OCP\\Files\\Events\\Node\\FilesystemTearedDownEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Events/Node/FilesystemTearedDownEvent.php',
+ 'OCP\\Files\\Events\\Node\\FilesystemTornDownEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Events/Node/FilesystemTornDownEvent.php',
'OCP\\Files\\Events\\Node\\NodeCopiedEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Events/Node/NodeCopiedEvent.php',
'OCP\\Files\\Events\\Node\\NodeCreatedEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Events/Node/NodeCreatedEvent.php',
'OCP\\Files\\Events\\Node\\NodeDeletedEvent' => __DIR__ . '/../../..' . '/lib/public/Files/Events/Node/NodeDeletedEvent.php',
diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php
index 0c444d5cd34..71a6385bce1 100644
--- a/lib/private/Files/Filesystem.php
+++ b/lib/private/Files/Filesystem.php
@@ -43,7 +43,7 @@ use OC\Files\Mount\MountPoint;
use OC\Lockdown\Filesystem\NullStorage;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Config\IMountProvider;
-use OCP\Files\Events\Node\FilesystemTearedDownEvent;
+use OCP\Files\Events\Node\FilesystemTornDownEvent;
use OCP\Files\NotFoundException;
use OCP\Files\Storage\IStorageFactory;
use OCP\ILogger;
@@ -336,7 +336,7 @@ class Filesystem {
self::$defaultInstance = new View($root);
/** @var IEventDispatcher $eventDispatcher */
$eventDispatcher = \OC::$server->get(IEventDispatcher::class);
- $eventDispatcher->addListener(FilesystemTearedDownEvent::class, function () {
+ $eventDispatcher->addListener(FilesystemTornDownEvent::class, function () {
self::$defaultInstance = null;
self::$usersSetup = [];
self::$loaded = false;
diff --git a/lib/private/Files/Node/Root.php b/lib/private/Files/Node/Root.php
index 6f47b49c66a..4e4dc0ec0de 100644
--- a/lib/private/Files/Node/Root.php
+++ b/lib/private/Files/Node/Root.php
@@ -40,7 +40,7 @@ use OC\Hooks\PublicEmitter;
use OC\User\NoUserException;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Config\IUserMountCache;
-use OCP\Files\Events\Node\FilesystemTearedDownEvent;
+use OCP\Files\Events\Node\FilesystemTornDownEvent;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
@@ -102,7 +102,7 @@ class Root extends Folder implements IRootFolder {
$this->userMountCache = $userMountCache;
$this->logger = $logger;
$this->userManager = $userManager;
- $eventDispatcher->addListener(FilesystemTearedDownEvent::class, function () {
+ $eventDispatcher->addListener(FilesystemTornDownEvent::class, function () {
$this->userFolderCache = new CappedMemoryCache();
});
}
diff --git a/lib/private/Files/SetupManager.php b/lib/private/Files/SetupManager.php
index 20be8178676..578372775ac 100644
--- a/lib/private/Files/SetupManager.php
+++ b/lib/private/Files/SetupManager.php
@@ -38,7 +38,7 @@ use OCP\Constants;
use OCP\Diagnostics\IEventLogger;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Config\IMountProviderCollection;
-use OCP\Files\Events\Node\FilesystemTearedDownEvent;
+use OCP\Files\Events\Node\FilesystemTornDownEvent;
use OCP\Files\Mount\IMountManager;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\Storage\IStorage;
@@ -201,6 +201,6 @@ class SetupManager {
$this->setupUsers = [];
$this->rootSetup = false;
$this->mountManager->clear();
- $this->eventDispatcher->dispatchTyped(new FilesystemTearedDownEvent());
+ $this->eventDispatcher->dispatchTyped(new FilesystemTornDownEvent());
}
}
diff --git a/lib/public/Files/Events/Node/FilesystemTornDownEvent.php b/lib/public/Files/Events/Node/FilesystemTornDownEvent.php
new file mode 100644
index 00000000000..d8e289a0a9f
--- /dev/null
+++ b/lib/public/Files/Events/Node/FilesystemTornDownEvent.php
@@ -0,0 +1,32 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2022 Robin Appelman <robin@icewind.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCP\Files\Events\Node;
+
+use OCP\EventDispatcher\Event;
+
+/**
+ * Event fired after the filesystem has been torn down
+ */
+class FilesystemTornDownEvent extends Event {
+}