diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2023-02-21 07:36:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-21 07:36:43 +0100 |
commit | 98ed72b3ed7e81a75d9a323c70a5e7f5af265a23 (patch) | |
tree | a92d3ab78f2fa52969139448a8aa7c509ed97af5 /apps/files_sharing | |
parent | 93e703bbfc7c8ef654b7b0185474397ec1bbaa6b (diff) | |
download | nextcloud-server-98ed72b3ed7e81a75d9a323c70a5e7f5af265a23.tar.gz nextcloud-server-98ed72b3ed7e81a75d9a323c70a5e7f5af265a23.zip |
Revert "fix(performance): Do not set up filesystem on every call"
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/tests/ApiTest.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/tests/TestCase.php | 8 |
2 files changed, 1 insertions, 13 deletions
diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php index d9b61f837eb..d7661297e9e 100644 --- a/apps/files_sharing/tests/ApiTest.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -73,7 +73,6 @@ class ApiTest extends TestCase { \OC::$server->getConfig()->setAppValue('core', 'shareapi_exclude_groups', 'no'); \OC::$server->getConfig()->setAppValue('core', 'shareapi_expire_after_n_days', '7'); - \OC::$server->getConfig()->setAppValue('core', 'shareapi_enforce_links_password', 'no'); $this->folder = self::TEST_FOLDER_NAME; $this->subfolder = '/subfolder_share_api_test'; @@ -81,11 +80,6 @@ class ApiTest extends TestCase { $this->filename = '/share-api-test.txt'; - // Initialize view again as we delete all filecache/mount entries in tearDown - // Otherwise those tests fail on object storage as the filecache is missing the user home - $this->view = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER1 . '/files'); - $this->view2 = new \OC\Files\View('/' . self::TEST_FILES_SHARING_API_USER2 . '/files'); - // save file with content $this->view->file_put_contents($this->filename, $this->data); $this->view->mkdir($this->folder); diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php index abdb6a2d60f..2bd83d6c9c2 100644 --- a/apps/files_sharing/tests/TestCase.php +++ b/apps/files_sharing/tests/TestCase.php @@ -33,7 +33,6 @@ namespace OCA\Files_Sharing\Tests; use OC\Files\Filesystem; -use OC\Files\View; use OCA\Files_Sharing\AppInfo\Application; use OCA\Files_Sharing\External\MountProvider as ExternalMountProvider; use OCA\Files_Sharing\MountProvider; @@ -212,12 +211,7 @@ abstract class TestCase extends \Test\TestCase { \OC::$server->getUserSession()->setUser(null); \OC\Files\Filesystem::tearDown(); \OC::$server->getUserSession()->login($user, $password); - // We need to get the directory listing to trigger the lazy user folder - // to create the files directory. Since the filecache might get cleared - // in the cache, any follow up test case may fail as with object storage - // the filecache represents the file structure - Filesystem::initMountPoints($user); - \OC::$server->getUserFolder($user)->getDirectoryListing(); + \OC::$server->getUserFolder($user); \OC_Util::setupFS($user); } |