Merge pull request #11307 from owncloud/manage-unfinished-uploads

[tests-only][full-ci] added test to resume all uploads sessions
This commit is contained in:
Prajwol Amatya authored and GitHub committed 2025-06-15 23:30:45 -07:00
commit d4691ca25f
3 files changed
+29

No files matched your search

+14
View File
@@ -917,4 +917,18 @@ class CliContext implements Context {
];
$this->featureContext->setResponse(CliHelper::runCommand($body));
}
/**
* @When the administrator resumes all the upload sessions using the CLI
*
* @return void
* @throws GuzzleException
*/
public function theAdministratorResumesAllTheUploadSessionsUsingTheCLI(): void {
$command = "storage-users uploads sessions --resume --json";
$body = [
"command" => $command
];
$this->featureContext->setResponse(CliHelper::runCommand($body));
}
}
@@ -392,5 +392,9 @@ The expected failures in this file are from features in the owncloud/ocis repo.
- [apiSharingNgDriveLinkShare/createInternalLinkShare.feature:339](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSharingNgDriveLinkShare/createInternalLinkShare.feature#L339)
#### [[CLI] Error while resuming an upload](https://github.com/owncloud/ocis/issues/11290)
- [cliCommands/uploadSessions.feature:156](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/cliCommands/uploadSessions.feature#L156)
Note: always have an empty line at the end of this file.
The bash script that processes this file requires that the last line has a newline on the end.
@@ -151,3 +151,14 @@ Feature: List upload sessions via CLI command
And the CLI response should not contain these entries:
| file1.txt |
| virusFile.txt |
@issue-11290
Scenario: resume all upload sessions
Given the config "POSTPROCESSING_DELAY" has been set to "10s"
And user "Alice" has uploaded file with content "upload content" to "file.txt"
And the administrator has stopped the server
And the administrator has started the server
When the administrator resumes all the upload sessions using the CLI
Then the command should be successful
And the CLI response should contain these entries:
| file.txt |