diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-03-18 08:57:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-18 08:57:09 +0100 |
commit | 6401d882833aeea775d64b70bc8b46c881ea8161 (patch) | |
tree | adc6cfa53079a6c4a5db24c636140d4b66abc932 /build/integration/features | |
parent | 5cdc3e9c9da5db8bf98c2786018941c412ffe146 (diff) | |
parent | 9ccabff6ba9a0e89d7128fbdd43d48fe7a68b11e (diff) | |
download | nextcloud-server-6401d882833aeea775d64b70bc8b46c881ea8161.tar.gz nextcloud-server-6401d882833aeea775d64b70bc8b46c881ea8161.zip |
Merge pull request #25331 from nextcloud/fix-valid-storages-removed-when-cleaning-remote-storages
Fix valid storages removed when cleaning remote storages
Diffstat (limited to 'build/integration/features')
-rw-r--r-- | build/integration/features/bootstrap/FederationContext.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/FederationContext.php b/build/integration/features/bootstrap/FederationContext.php index 41581110bdf..359d3226b30 100644 --- a/build/integration/features/bootstrap/FederationContext.php +++ b/build/integration/features/bootstrap/FederationContext.php @@ -37,6 +37,20 @@ require __DIR__ . '/../../vendor/autoload.php'; class FederationContext implements Context, SnippetAcceptingContext { use WebDav; use AppConfiguration; + use CommandLine; + + /** + * @BeforeScenario + */ + public function cleanupRemoteStorages() { + // Ensure that dangling remote storages from previous tests will not + // interfere with the current scenario. + // The storages must be cleaned before each scenario; they can not be + // cleaned after each scenario, as this hook is executed before the hook + // that removes the users, so the shares would be still valid and thus + // the storages would not be dangling yet. + $this->runOcc(['sharing:cleanup-remote-storages']); + } /** * @Given /^User "([^"]*)" from server "(LOCAL|REMOTE)" shares "([^"]*)" with user "([^"]*)" from server "(LOCAL|REMOTE)"$/ |