Merge pull request #10260 from owncloud/clean-upload-sessions

[tests-only][full-ci] add test to clean upload sessions that are not processing using CLI command
This commit is contained in:
Prajwol Amatya
2024-10-22 14:14:09 +05:45
committed by GitHub
2 changed files with 29 additions and 4 deletions
+10 -3
View File
@@ -257,12 +257,19 @@ class CliContext implements Context {
}
/**
* @When the administrator cleans all expired upload sessions
* @When the administrator cleans upload sessions with the following flags:
*
* @param TableNode $table
*
* @return void
*/
public function theAdministratorCleansAllExpiredUploadSessions(): void {
$command = "storage-users uploads sessions --expired --clean --json";
public function theAdministratorCleansUploadSessionsWithTheFollowingFlags(TableNode $table): void {
$flag = "";
foreach ($table->getRows() as $row) {
$flag .= "--$row[0] ";
}
$flagString = trim($flag);
$command = "storage-users uploads sessions $flagString --clean --json";
$body = [
"command" => $command
];