File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed
Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -894,4 +894,21 @@ public function theAdministratorRestoresTheTrashedResourcesOfSpaceOwnedByUser(
894894 ];
895895 $ this ->featureContext ->setResponse (CliHelper::runCommand ($ body ));
896896 }
897+
898+ /**
899+ * @When /^the administrator (resumes|restarts) all the stale uploads$/
900+ *
901+ * @param string $flag
902+ *
903+ * @return void
904+ * @throws GuzzleException
905+ */
906+ public function theAdministratorResumesOrRestartsAllTheStaleUploads (string $ flag ): void {
907+ $ flag = rtrim ($ flag , "s " );
908+ $ command = "storage-users uploads sessions -- $ flag --json " ;
909+ $ body = [
910+ "command " => $ command
911+ ];
912+ $ this ->featureContext ->setResponse (CliHelper::runCommand ($ body ));
913+ }
897914}
Original file line number Diff line number Diff line change @@ -406,5 +406,10 @@ The expected failures in this file are from features in the owncloud/ocis repo.
406406#### [ Activity. no event for deleting a file using file-id] ( https://github.com/owncloud/ocis/issues/10328 )
407407- [ apiActivities/activitiesByFileId.feature:2017] ( https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiActivities/activitiesByFileId.feature#L2017 )
408408
409+ #### [[ CLI] Restart and Resume stale uploads returns empty list] ( https://github.com/owncloud/ocis/issues/11296 )
410+
411+ - [ cliCommands/staleUpload.feature:85] ( https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/cliCommands/staleUpload.feature#L85 )
412+ - [ cliCommands/staleUpload.feature:97] ( https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/cliCommands/staleUpload.feature#L97 )
413+
409414Note: always have an empty line at the end of this file.
410415The bash script that processes this file requires that the last line has a newline on the end.
Original file line number Diff line number Diff line change @@ -80,3 +80,27 @@ Feature: stale upload via CLI command
8080 Total stale nodes: 1
8181 """
8282 And there should be "0" stale uploads of space "Personal" owned by user "Alice"
83+
84+ @issue-11296
85+ Scenario : resume all stale uploads
86+ Given the config "POSTPROCESSING_DELAY" has been set to "10s"
87+ And user "Alice" has uploaded file with content "some content" to "textfile.txt"
88+ And the administrator has stopped the server
89+ And the administrator has created stale upload
90+ And the administrator has started the server
91+ When the administrator resumes all the stale uploads
92+ Then the command should be successful
93+ And the CLI response should contain these entries:
94+ | textfile .txt |
95+
96+ @issue-11296
97+ Scenario : restart all stale uploads
98+ Given the config "POSTPROCESSING_DELAY" has been set to "10s"
99+ And user "Alice" has uploaded file with content "some content" to "textfile.txt"
100+ And the administrator has stopped the server
101+ And the administrator has created stale upload
102+ And the administrator has started the server
103+ When the administrator restarts all the stale uploads
104+ Then the command should be successful
105+ And the CLI response should contain these entries:
106+ | textfile .txt |
You can’t perform that action at this time.
0 commit comments