Skip to content

Commit

Permalink
fix reset settings to original state after testrun
Browse files Browse the repository at this point in the history
  • Loading branch information
individual-it authored and phil-davis committed Jul 30, 2018
1 parent 0233b72 commit 7dbd2b3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 3 additions & 1 deletion tests/TestHelpers/AppConfigHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ public static function getParameterValueFromXml(
$pathToElement = \explode('@@@', $capabilitiesPath);
$answeredValue = $xml->{$capabilitiesApp};
for ($i = 0; $i < \count($pathToElement); $i++) {
$answeredValue = $answeredValue->{$pathToElement[$i]};
if (\gettype($answeredValue) === "object") {
$answeredValue = $answeredValue->{$pathToElement[$i]};
}
}
return (string)$answeredValue;
}
Expand Down
6 changes: 1 addition & 5 deletions tests/acceptance/features/apiFederation/federated.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
Feature: federated
Background:
Given using OCS API version "1"
And parameter "shareapi_enabled" of app "core" has been set to "yes"
And parameter "shareapi_allow_resharing" of app "core" has been set to "yes"
And parameter "outgoing_server2server_share_enabled" of app "files_sharing" has been set to "yes"
And parameter "incoming_server2server_share_enabled" of app "files_sharing" has been set to "yes"


Scenario: Federate share a file with another server
Given using server "REMOTE"
And user "user1" has been created
Expand Down
8 changes: 4 additions & 4 deletions tests/acceptance/features/bootstrap/Sharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -1540,15 +1540,15 @@ protected function getCommonSharingConfigs() {
'testingState' => false
],
[
'capabilitiesApp' => 'federation',
'capabilitiesParameter' => 'outgoing',
'capabilitiesApp' => 'files_sharing',
'capabilitiesParameter' => 'federation@@@outgoing',
'testingApp' => 'files_sharing',
'testingParameter' => 'outgoing_server2server_share_enabled',
'testingState' => true
],
[
'capabilitiesApp' => 'federation',
'capabilitiesParameter' => 'incoming',
'capabilitiesApp' => 'files_sharing',
'capabilitiesParameter' => 'federation@@@incoming',
'testingApp' => 'files_sharing',
'testingParameter' => 'incoming_server2server_share_enabled',
'testingState' => true
Expand Down

0 comments on commit 7dbd2b3

Please sign in to comment.