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(
894
894
];
895
895
$ this ->featureContext ->setResponse (CliHelper::runCommand ($ body ));
896
896
}
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
+ }
897
914
}
Original file line number Diff line number Diff line change @@ -403,5 +403,10 @@ The expected failures in this file are from features in the owncloud/ocis repo.
403
403
- [ apiActivities/activities.feature:4108] ( https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiActivities/activities.feature#L4108 )
404
404
- [ apiActivities/activitiesByFileId.feature:1842] ( https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiActivities/activitiesByFileId.feature#L1842 )
405
405
406
+ #### [[ CLI] Restart and Resume stale uploads returns empty list] ( https://github.com/owncloud/ocis/issues/11296 )
407
+
408
+ - [ cliCommands/staleUpload.feature:85] ( https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/cliCommands/staleUpload.feature#L85 )
409
+ - [ cliCommands/staleUpload.feature:97] ( https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/cliCommands/staleUpload.feature#L97 )
410
+
406
411
Note: always have an empty line at the end of this file.
407
412
The 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
80
80
Total stale nodes: 1
81
81
"""
82
82
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