diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-02-05 23:46:28 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2025-02-06 15:46:15 +0100 |
commit | 2c03bc74fa61e6a8c437e11412f70aa6caa979ab (patch) | |
tree | 9105a1d2ed9d5ea7d8790f94d320e7e3d8c816b5 /build | |
parent | e550ad7bbe65fec2b4515d40c67ddea41ae40e48 (diff) | |
download | nextcloud-server-2c03bc74fa61e6a8c437e11412f70aa6caa979ab.tar.gz nextcloud-server-2c03bc74fa61e6a8c437e11412f70aa6caa979ab.zip |
fix(provisioning_api): Correct limit for `editUser`
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'build')
-rw-r--r-- | build/integration/features/bootstrap/BasicStructure.php | 6 | ||||
-rw-r--r-- | build/integration/features/bootstrap/FeatureContext.php | 7 | ||||
-rw-r--r-- | build/integration/features/provisioning-v1.feature | 7 |
3 files changed, 19 insertions, 1 deletions
diff --git a/build/integration/features/bootstrap/BasicStructure.php b/build/integration/features/bootstrap/BasicStructure.php index 60926e65f5c..57d18757212 100644 --- a/build/integration/features/bootstrap/BasicStructure.php +++ b/build/integration/features/bootstrap/BasicStructure.php @@ -121,7 +121,11 @@ trait BasicStructure { * @return string */ public function getOCSResponse($response) { - return simplexml_load_string($response->getBody())->meta[0]->statuscode; + $body = simplexml_load_string((string)$response->getBody()); + if ($body === false) { + throw new \RuntimeException('Could not parse OCS response, body is not valid XML'); + } + return $body->meta[0]->statuscode; } /** diff --git a/build/integration/features/bootstrap/FeatureContext.php b/build/integration/features/bootstrap/FeatureContext.php index 59f1d0068dd..c91c5e7cfa3 100644 --- a/build/integration/features/bootstrap/FeatureContext.php +++ b/build/integration/features/bootstrap/FeatureContext.php @@ -13,9 +13,16 @@ require __DIR__ . '/../../vendor/autoload.php'; * Features context. */ class FeatureContext implements Context, SnippetAcceptingContext { + use AppConfiguration; use ContactsMenu; use ExternalStorage; use Search; use WebDav; use Trashbin; + + protected function resetAppConfigs(): void { + $this->deleteServerConfig('bruteForce', 'whitelist_0'); + $this->deleteServerConfig('bruteForce', 'whitelist_1'); + $this->deleteServerConfig('bruteforcesettings', 'apply_allowlist_to_ratelimit'); + } } diff --git a/build/integration/features/provisioning-v1.feature b/build/integration/features/provisioning-v1.feature index 12498bedd7f..32dfebb5c7d 100644 --- a/build/integration/features/provisioning-v1.feature +++ b/build/integration/features/provisioning-v1.feature @@ -4,6 +4,9 @@ Feature: provisioning Background: Given using api version "1" + Given parameter "whitelist_0" of app "bruteForce" is set to "127.0.0.1" + Given parameter "whitelist_1" of app "bruteForce" is set to "::1" + Given parameter "apply_allowlist_to_ratelimit" of app "bruteforcesettings" is set to "true" Scenario: Getting an not existing user Given As an "admin" @@ -604,6 +607,7 @@ Feature: provisioning | settings | | sharebymail | | systemtags | + | testing | | theming | | twofactor_backupcodes | | updatenotification | @@ -629,6 +633,7 @@ Feature: provisioning And the HTTP status code should be "200" Scenario: enable an app + Given invoking occ with "app:disable testing" Given As an "admin" And app "testing" is disabled When sending "POST" to "/cloud/apps/testing" @@ -643,12 +648,14 @@ Feature: provisioning And the HTTP status code should be "200" Scenario: disable an app + Given invoking occ with "app:enable testing" Given As an "admin" And app "testing" is enabled When sending "DELETE" to "/cloud/apps/testing" Then the OCS status code should be "100" And the HTTP status code should be "200" And app "testing" is disabled + Given invoking occ with "app:enable testing" Scenario: disable an user Given As an "admin" |