Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorSergio Bertolin <sbertolin@solidgear.es>2015-12-04 17:08:16 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-11 18:20:04 +0300
commit4338a741f256a96c53aae30e495e6c5587587865 (patch)
treebb2d4df7699b89ec8adaa2014114bf1b4a8eebc7 /build
parentaee4887224eac9cddbeb5e11990f264f084cb884 (diff)
Added functionality for changing server configuration
Diffstat (limited to 'build')
-rw-r--r--build/integration/capabilities_features/capabilities.feature19
-rw-r--r--build/integration/features/bootstrap/CapabilitiesContext.php19
2 files changed, 38 insertions, 0 deletions
diff --git a/build/integration/capabilities_features/capabilities.feature b/build/integration/capabilities_features/capabilities.feature
index 6c1e727e7b3..59fb5302ac4 100644
--- a/build/integration/capabilities_features/capabilities.feature
+++ b/build/integration/capabilities_features/capabilities.feature
@@ -20,6 +20,25 @@ Feature: capabilities
| files | undelete | 1 | |
| files | versioning | 1 | |
+ Scenario: Changing api_enabled
+ Given As an "admin"
+ And parameter "shareapi_allow_public_upload" is set to "0"
+ 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 | 0 |
+ | files_sharing | resharing | 1 | |
+ | files_sharing | federation | outgoing | 1 |
+ | files_sharing | federation | incoming | 1 |
+ | 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 1b0015dce73..0e5d990f9a6 100644
--- a/build/integration/features/bootstrap/CapabilitiesContext.php
+++ b/build/integration/features/bootstrap/CapabilitiesContext.php
@@ -14,6 +14,25 @@ class CapabilitiesContext implements Context, SnippetAcceptingContext {
use Provisioning;
use Sharing;
+ private $apacheUser = '';
+
+ /**
+ * @Given /^parameter "([^"]*)" is set to "([^"]*)"$/
+ */
+ public function modifyServerConfig($parameter, $value){
+ $this->apacheUser = exec('ps axho user,comm|grep -E "httpd|apache"|uniq|grep -v "root"|awk \'END {if ($1) print $1}\'');
+ $comando = 'sudo -u ' . $this->apacheUser . ' ../../occ config:app:set ' . $parameter . ' ' . $value;
+ echo "COMANDO: $comando\n";
+ $expectedAnswer = "Config value $value for app $parameter set to";
+ $output = exec($comando);
+ PHPUnit_Framework_Assert::assertEquals(
+ $output,
+ $expectedAnswer,
+ "Failed setting $parameter to $value"
+ );
+
+ }
+
/**
* @Then /^fields of capabilities match with$/
* @param \Behat\Gherkin\Node\TableNode|null $formData