Skip to content

Commit

Permalink
Merge pull request #38661 from owncloud/tidy-up-user-cleanup-for-ocis…
Browse files Browse the repository at this point in the history
…-reva

[tests-only] Tidy up user cleanup when running on OCIS or reva
  • Loading branch information
individual-it authored Apr 29, 2021
2 parents 6697ad9 + 552dd42 commit 8bf97c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/TestHelpers/OcisHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public static function getStorageDriver() {
if ($storageDriver === false) {
return "OWNCLOUD";
}
$storageDriver = \strtoupper($storageDriver);
if ($storageDriver !== "OCIS" && $storageDriver !== "EOS" && $storageDriver !== "OWNCLOUD" && $storageDriver !== "S3NG") {
throw new \Exception(
"Invalid storage driver. " .
Expand All @@ -95,7 +96,9 @@ public static function getStorageDriver() {
public static function deleteRevaUserData($user = "") {
$deleteCmd = self::getDeleteUserDataCommand();
if ($deleteCmd === false) {
self::recurseRmdir(self::getOcisRevaDataRoot() . $user);
if (self::getStorageDriver() === "OWNCLOUD") {
self::recurseRmdir(self::getOcisRevaDataRoot() . $user);
}
return;
}
if (self::getStorageDriver() === "EOS") {
Expand Down

0 comments on commit 8bf97c1

Please sign in to comment.