aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2018-07-05 13:51:34 +0200
committerBjoern Schiessle <bjoern@schiessle.org>2018-07-11 10:11:49 +0200
commit0c09f566c24e45b3d4dc91dc2bddc341e4f76fbd (patch)
treecc2dc43acfb8400487c63559203714c0a21ca24a /build/integration/features/bootstrap
parentf0aaf62b24a0ecdb964665c94cfac330b86afed2 (diff)
downloadnextcloud-server-0c09f566c24e45b3d4dc91dc2bddc341e4f76fbd.tar.gz
nextcloud-server-0c09f566c24e45b3d4dc91dc2bddc341e4f76fbd.zip
add some integration tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'build/integration/features/bootstrap')
-rw-r--r--build/integration/features/bootstrap/FederationContext.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/FederationContext.php b/build/integration/features/bootstrap/FederationContext.php
index f3eb004fb84..12bf9c0fe63 100644
--- a/build/integration/features/bootstrap/FederationContext.php
+++ b/build/integration/features/bootstrap/FederationContext.php
@@ -35,6 +35,7 @@ require __DIR__ . '/../../vendor/autoload.php';
class FederationContext implements Context, SnippetAcceptingContext {
use WebDav;
+ use AppConfiguration;
/**
* @Given /^User "([^"]*)" from server "(LOCAL|REMOTE)" shares "([^"]*)" with user "([^"]*)" from server "(LOCAL|REMOTE)"$/
@@ -56,6 +57,27 @@ class FederationContext implements Context, SnippetAcceptingContext {
$this->usingServer($previous);
}
+
+ /**
+ * @Given /^User "([^"]*)" from server "(LOCAL|REMOTE)" shares "([^"]*)" with group "([^"]*)" from server "(LOCAL|REMOTE)"$/
+ *
+ * @param string $sharerUser
+ * @param string $sharerServer "LOCAL" or "REMOTE"
+ * @param string $sharerPath
+ * @param string $shareeUser
+ * @param string $shareeServer "LOCAL" or "REMOTE"
+ */
+ public function federateGroupSharing($sharerUser, $sharerServer, $sharerPath, $shareeGroup, $shareeServer){
+ if ($shareeServer == "REMOTE"){
+ $shareWith = "$shareeGroup@" . substr($this->remoteBaseUrl, 0, -4);
+ } else {
+ $shareWith = "$shareeGroup@" . substr($this->localBaseUrl, 0, -4);
+ }
+ $previous = $this->usingServer($sharerServer);
+ $this->createShare($sharerUser, $sharerPath, 9, $shareWith, null, null, null);
+ $this->usingServer($previous);
+ }
+
/**
* @When /^User "([^"]*)" from server "(LOCAL|REMOTE)" accepts last pending share$/
* @param string $user
@@ -73,4 +95,9 @@ class FederationContext implements Context, SnippetAcceptingContext {
$this->theOCSStatusCodeShouldBe('100');
$this->usingServer($previous);
}
+
+ protected function resetAppConfigs() {
+ $this->modifyServerConfig('files_sharing', 'incoming_server2server_group_share_enabled', 'no');
+ $this->modifyServerConfig('files_sharing', 'outgoing_server2server_group_share_enabled', 'no');
+ }
}