aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/FederationContext.php
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-01-22 12:40:59 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2021-01-26 11:06:33 +0100
commit3aba5b27be3808107c2090a34c614ca11837aeac (patch)
tree9aa032f3130da6e30015dd890edee8e681a3a509 /build/integration/features/bootstrap/FederationContext.php
parent7a892a310d46e3d99418f2c3cd58c1897679ce9e (diff)
downloadnextcloud-server-3aba5b27be3808107c2090a34c614ca11837aeac.tar.gz
nextcloud-server-3aba5b27be3808107c2090a34c614ca11837aeac.zip
Add integration tests for "sharing:cleanup-remote-storages" OCC command
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build/integration/features/bootstrap/FederationContext.php')
-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)"$/