summaryrefslogtreecommitdiffstats
path: root/build/integration/features
diff options
context:
space:
mode:
Diffstat (limited to 'build/integration/features')
-rw-r--r--build/integration/features/bootstrap/FederationContext.php14
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)"$/