summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/integration/capabilities_features/capabilities.feature95
-rw-r--r--build/integration/features/bootstrap/CapabilitiesContext.php18
2 files changed, 108 insertions, 5 deletions
diff --git a/build/integration/capabilities_features/capabilities.feature b/build/integration/capabilities_features/capabilities.feature
index e473d5d7bdb..e4c53269caa 100644
--- a/build/integration/capabilities_features/capabilities.feature
+++ b/build/integration/capabilities_features/capabilities.feature
@@ -20,7 +20,7 @@ Feature: capabilities
| files | undelete | 1 | |
| files | versioning | 1 | |
- Scenario: Changing api_enabled
+ Scenario: Changing public upload
Given As an "admin"
And parameter "shareapi_allow_public_upload" of app "core" is set to "no"
When sending "GET" to "/cloud/capabilities"
@@ -39,7 +39,100 @@ Feature: capabilities
| files | undelete | 1 | |
| files | versioning | 1 | |
+ Scenario: Disabling share api
+ Given As an "admin"
+ And parameter "shareapi_enabled" of app "core" is set to "no"
+ When sending "GET" to "/cloud/capabilities"
+ Then the HTTP status code should be "200"
+ And fields of capabilities match with
+ | capability | feature | value_or_subfeature | value |
+ | core | pollinterval | 60 | |
+ | core | webdav-root | remote.php/webdav | |
+ | files_sharing | api_enabled | EMPTY | |
+ | files_sharing | public | enabled | EMPTY |
+ | files_sharing | public | upload | EMPTY |
+ | files_sharing | resharing | EMPTY | |
+ | files_sharing | federation | outgoing | 1 |
+ | files_sharing | federation | incoming | 1 |
+ | files | bigfilechunking | 1 | |
+ | files | undelete | 1 | |
+ | files | versioning | 1 | |
+
+ Scenario: Disabling public links
+ Given As an "admin"
+ And parameter "shareapi_allow_links" of app "core" is set to "no"
+ When sending "GET" to "/cloud/capabilities"
+ Then the HTTP status code should be "200"
+ And fields of capabilities match with
+ | capability | feature | value_or_subfeature | value |
+ | core | pollinterval | 60 | |
+ | core | webdav-root | remote.php/webdav | |
+ | files_sharing | api_enabled | 1 | |
+ | files_sharing | public | enabled | EMPTY |
+ | files_sharing | public | upload | EMPTY |
+ | files_sharing | resharing | 1 | |
+ | files_sharing | federation | outgoing | 1 |
+ | files_sharing | federation | incoming | 1 |
+ | files | bigfilechunking | 1 | |
+ | files | undelete | 1 | |
+ | files | versioning | 1 | |
+
+ Scenario: Changing resharing
+ Given As an "admin"
+ And parameter "shareapi_allow_resharing" of app "core" is set to "no"
+ When sending "GET" to "/cloud/capabilities"
+ Then the HTTP status code should be "200"
+ And fields of capabilities match with
+ | capability | feature | value_or_subfeature | value |
+ | core | pollinterval | 60 | |
+ | core | webdav-root | remote.php/webdav | |
+ | files_sharing | api_enabled | 1 | |
+ | files_sharing | public | enabled | 1 |
+ | files_sharing | public | upload | 1 |
+ | files_sharing | resharing | EMPTY | |
+ | files_sharing | federation | outgoing | 1 |
+ | files_sharing | federation | incoming | 1 |
+ | files | bigfilechunking | 1 | |
+ | files | undelete | 1 | |
+ | files | versioning | 1 | |
+
+ Scenario: Changing federation outgoing
+ Given As an "admin"
+ And parameter "outgoing_server2server_share_enabled" of app "files_sharing" is set to "no"
+ When sending "GET" to "/cloud/capabilities"
+ Then the HTTP status code should be "200"
+ And fields of capabilities match with
+ | capability | feature | value_or_subfeature | value |
+ | core | pollinterval | 60 | |
+ | core | webdav-root | remote.php/webdav | |
+ | files_sharing | api_enabled | 1 | |
+ | files_sharing | public | enabled | 1 |
+ | files_sharing | public | upload | 1 |
+ | files_sharing | resharing | 1 | |
+ | files_sharing | federation | outgoing | EMPTY |
+ | files_sharing | federation | incoming | 1 |
+ | files | bigfilechunking | 1 | |
+ | files | undelete | 1 | |
+ | files | versioning | 1 | |
+ Scenario: Changing federation incoming
+ Given As an "admin"
+ And parameter "incoming_server2server_share_enabled" of app "files_sharing" is set to "no"
+ When sending "GET" to "/cloud/capabilities"
+ Then the HTTP status code should be "200"
+ And fields of capabilities match with
+ | capability | feature | value_or_subfeature | value |
+ | core | pollinterval | 60 | |
+ | core | webdav-root | remote.php/webdav | |
+ | files_sharing | api_enabled | 1 | |
+ | files_sharing | public | enabled | 1 |
+ | files_sharing | public | upload | 1 |
+ | files_sharing | resharing | 1 | |
+ | files_sharing | federation | outgoing | 1 |
+ | files_sharing | federation | incoming | EMPTY |
+ | files | bigfilechunking | 1 | |
+ | files | undelete | 1 | |
+ | files | versioning | 1 | |
diff --git a/build/integration/features/bootstrap/CapabilitiesContext.php b/build/integration/features/bootstrap/CapabilitiesContext.php
index ee13db4bcba..e423be7f9f3 100644
--- a/build/integration/features/bootstrap/CapabilitiesContext.php
+++ b/build/integration/features/bootstrap/CapabilitiesContext.php
@@ -32,15 +32,15 @@ class CapabilitiesContext implements Context, SnippetAcceptingContext {
if ($row['value'] === ''){
$answeredValue = (string)$capabilitiesXML->$row['capability']->$row['feature'];
PHPUnit_Framework_Assert::assertEquals(
- $answeredValue,
- $row['value_or_subfeature'],
+ $row['value_or_subfeature']==="EMPTY" ? '' : $row['value_or_subfeature'],
+ $answeredValue,
"Failed field " . $row['capability'] . " " . $row['feature']
);
} else{
$answeredValue = (string)$capabilitiesXML->$row['capability']->$row['feature']->$row['value_or_subfeature'];
PHPUnit_Framework_Assert::assertEquals(
- $answeredValue,
- $row['value']==="EMPTY" ? '' : $row['value'],
+ $row['value']==="EMPTY" ? '' : $row['value'],
+ $answeredValue,
"Failed field: " . $row['capability'] . " " . $row['feature'] . " " . $row['value_or_subfeature']
);
}
@@ -51,14 +51,24 @@ class CapabilitiesContext implements Context, SnippetAcceptingContext {
* @BeforeScenario
*/
public function prepareParameters(){
+ $this->modifyServerConfig('core', 'shareapi_enabled', 'yes');
+ $this->modifyServerConfig('core', 'shareapi_allow_links', 'yes');
$this->modifyServerConfig('core', 'shareapi_allow_public_upload', 'yes');
+ $this->modifyServerConfig('core', 'shareapi_allow_resharing', 'yes');
+ $this->modifyServerConfig('files_sharing', 'outgoing_server2server_share_enabled', 'yes');
+ $this->modifyServerConfig('files_sharing', 'incoming_server2server_share_enabled', 'yes');
}
/**
* @AfterScenario
*/
public function undoChangingParameters(){
+ $this->modifyServerConfig('core', 'shareapi_enabled', 'yes');
+ $this->modifyServerConfig('core', 'shareapi_allow_links', 'yes');
$this->modifyServerConfig('core', 'shareapi_allow_public_upload', 'yes');
+ $this->modifyServerConfig('core', 'shareapi_allow_resharing', 'yes');
+ $this->modifyServerConfig('files_sharing', 'outgoing_server2server_share_enabled', 'yes');
+ $this->modifyServerConfig('files_sharing', 'incoming_server2server_share_enabled', 'yes');
}
/**