From 3aba5b27be3808107c2090a34c614ca11837aeac Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez Date: Fri, 22 Jan 2021 12:40:59 +0100 Subject: Add integration tests for "sharing:cleanup-remote-storages" OCC command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Calviño Sánchez --- build/integration/features/bootstrap/FederationContext.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'build/integration/features') 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)"$/ -- cgit v1.2.3