diff --git a/tests/acceptance/features/bootstrap/WebDav.php b/tests/acceptance/features/bootstrap/WebDav.php index ef41eeea3bbc..4ba6303ae2ae 100644 --- a/tests/acceptance/features/bootstrap/WebDav.php +++ b/tests/acceptance/features/bootstrap/WebDav.php @@ -3278,42 +3278,6 @@ public function userHasUploadedAFileWithContentTo( return $fileId; } - /** - * @Given the administrator has created a json file with exported config of local storage mount :mount to :destination in temporary storage - * - * @param string $mount - * @param string $destination - * - * @return void - * @throws Exception - * @throws GuzzleException - */ - public function theAdminHasCreatedAJsonFileWithExportedMountConfig( - string $mount, - string $destination - ): void { - $actualConfig = null; - $commandOutput = \json_decode( - SetupHelper::runOcc( - ['files_external:export'], - $this->getStepLineRef() - )['stdOut'] - ); - - //identifying the correct config and also removing the "mount id" property - foreach ($commandOutput as $i) { - if ($mount === \ltrim($i->mount_point, '/')) { - unset($i->mount_id); - $actualConfig = $i; - break; - } - } - - $actualConfig = json_encode($actualConfig); - $this->copyContentToFileInTemporaryStorageOnSystemUnderTest($destination, $actualConfig); - $this->theFileWithContentShouldExistInTheServerRoot(TEMPORARY_STORAGE_DIR_ON_REMOTE_SERVER . "/$destination", $actualConfig); - } - /** * @Given /^user "([^"]*)" has uploaded the following files with content "([^"]*)"$/ * diff --git a/tests/acceptance/features/cliExternalStorage/filesExternalWebdavOwncloud.feature b/tests/acceptance/features/cliExternalStorage/filesExternalWebdavOwncloud.feature index 5a54541df9d1..bb9aacaaf97b 100644 --- a/tests/acceptance/features/cliExternalStorage/filesExternalWebdavOwncloud.feature +++ b/tests/acceptance/features/cliExternalStorage/filesExternalWebdavOwncloud.feature @@ -200,7 +200,9 @@ Feature: using files external service with storage as webdav_owncloud | storage_backend | owncloud | | mount_point | TestMountPoint | | authentication_backend | password::password | - And the administrator has created a json file with exported config of local storage mount "TestMountPoint" to "mountConfig.json" in temporary storage + And the administrator has exported the local storage mounts using the occ command + And the administrator has created a file "mountConfig.json" in temporary storage with the last exported content using the testing API + And the administrator has deleted local storage "local_storage" using the occ command And the administrator has deleted external storage with mount point "TestMountPoint" When the administrator imports the local storage mount from file "mountConfig.json" using the occ command Then the command should have been successful