Skip to content

Commit

Permalink
Remove the similar step
Browse files Browse the repository at this point in the history
  • Loading branch information
grgprarup committed Oct 19, 2022
1 parent ffc3c40 commit 88b8afc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 37 deletions.
36 changes: 0 additions & 36 deletions tests/acceptance/features/bootstrap/WebDav.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 "([^"]*)"$/
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 88b8afc

Please sign in to comment.