aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap/BasicStructure.php
Commit message (Collapse)AuthorAgeFilesLines
* fix: Fix theming for disabled accountsfix-theming-for-disabled-accountsDaniel Calviño Sánchez11 days1-0/+1
| | | | | | | | | | | | | | | | | | | | | | The Theming app injects the stylesheets for the different themes in the "<header>" element of the page, and those stylesheets are then loaded by the browser from a "Controller" (a plain "Controller", not an "OCSController"). The stylesheets, in turn, may also get some images (like the background) also from the "Controller". When handling a request to "index.php" it is checked whether the user is logged in and, if not, a login is tried. A disabled user is explicitly seen as not logged in, so a login is always tried in that case, but disabled users are also explicitly prevented to log in, so the login also fails. Due to that trying to get any of the themed stylesheets or images with a disabled account (to be able to show the "Account disabled" error page) fails with an HTTP status 401. To solve that, and to avoid touching this basic logic as much as possible, the login exception is now ignored (if the user is disabled) for some specific requests to the Theming app. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* chore: apply new CSFixer rulesFerdinand Thiessen2025-07-011-0/+1
| | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de> # Conflicts: # apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
* feat: Add context and test steps for activity in sharingCôme Chilliet2025-03-251-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(provisioning_api): Correct limit for `editUser`Ferdinand Thiessen2025-02-061-1/+5
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: add file conversion integration testsfeat/conversion-adjustingskjnldsv2025-01-161-0/+3
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* feat(login): add origin check at loginBenjamin Gaussorgues2024-12-051-1/+5
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* test: Add integration tests for saving external userglobal storagesDaniel Calviño Sánchez2024-09-041-1/+1
| | | | | | | | | As the external storage uses the Nextcloud server itself the number of workers of the PHP process running the Nextcloud server had to be increased. Otherwise if a request is sent for the external storage while handling a request from the integration tests a deadlock would occur. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-22/+22
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-131-30/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* feat(s3): Use multipart upload for chunked uploadingJulius Härtl2023-03-081-2/+2
| | | | | | This allows to stream file chunks directly to S3 during upload. Signed-off-by: Julius Härtl <jus@bitgrid.net>
* composer run cs:fixCôme Chilliet2023-01-201-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-4/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add integration tests for autocomplete/get (similar to sharees API)Joas Schilling2021-03-101-0/+34
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headersChristoph Wurst2020-12-301-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make integration tests work with both PHP 7.3 and 7.4Daniel Calviño Sánchez2020-12-301-1/+0
| | | | | | | | | | | | | | | | The "Trashbin" and "WebDav" traits were using each other in a circular dependency ("WebDav" -> "Sharing" -> "Provisioning" -> "BasicStructure" -> "Trashbin" -> "WebDav"). In PHP 7.3 this worked fine, but in PHP 7.4 the fatal error "Trait 'WebDav' not found in .../Trashbin.php" was thrown. To solve this now the "TrashBin" trait no longer explicitly uses "WebDav". However, due to this change, the class using "TrashBin" is now expected to also use "WebDav". As the "Trashbin" trait was not needed by most contexts using the "BasicStructure" trait "Trashbin" was removed from it and added only to those contexts that actually need it. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add integration tests for user avatarsDaniel Calviño Sánchez2020-12-071-0/+1
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Make possible to set body in requesttoken requests in integration testsDaniel Calviño Sánchez2020-12-071-7/+17
| | | | | | | | | | "sendingAToWithRequesttoken" needs to be used to test some non OCS endpoints which require the request token to be sent in the request. Now it is possible to specify the body (or, rather, additional contents beside the cookies and the request token) for those requests, as it will be needed for example to upload an avatar. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Make possible to send requests as anonymous users in integration testsDaniel Calviño Sánchez2020-12-071-2/+2
| | | | | | | | | Until now requests always had "auth" headers either for an admin or a regular user, depending on the value of "currentUser". Now, if "currentUser" starts by "anonymous" no "auth" header is sent, which makes possible to also test requests with users not logged in. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Add integration tests for creating and updating a mail shareDaniel Calviño Sánchez2020-05-291-0/+1
| | | | | | | | | | | | | | | | | | | | | In most cases, when a mail share is created or updated an e-mail is sent to the sharee, which is done by connecting to the SMTP server set in the configuration. If the server can not be contacted then the creation or update of the mail share fails. To make possible to test mail shares without using a real SMTP server a fake one has been added. The original script, which is MIT licensed, was based on inetd, so it was slightly modified to run on its own. In order to use it from the integration tests the "Given dummy mail server is listening" step has to be called in the scenarios in which the mail server is needed. For now that is the only available step; things like checking the sent mails, while possible (as the script can log the mails to certain file), have not been added yet. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-3/+2
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-2/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* add LDAP integr. test for receiving share candidates with group limitationArthur Schiwon2019-06-141-3/+27
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* convert connection testsArthur Schiwon2018-08-091-0/+7
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Fixed phpunit Test classJohn Molakvoæ (skjnldsv)2018-06-131-3/+4
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add integration tests for downloading basic zip filesDaniel Calviño Sánchez2018-04-061-0/+13
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix use of data directory in integration testsDaniel Calviño Sánchez2018-04-061-2/+23
| | | | | | | | The data directory is not necessarily located at "../..". The proper directory is now got by running "php console.php config:system:get datadirectory". Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* fix redundant namespaceRobin Appelman2018-02-121-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Adjust integration tests to new guzzleRobin Appelman2018-02-091-47/+51
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Some tests for the remote cloud apiRobin Appelman2017-12-081-0/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headersMorris Jobke2017-11-061-1/+5
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add integration test for trashbinVincent Petry2017-04-111-10/+1
| | | | | | | | | Add test for basic deletion. Add test when deleting from shared folder as recipient. Add test to check that metadata stays when moving out of shared folder as recipient. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Strict comparisonsJoas Schilling2017-03-201-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Added functions to add files in local_storageSergio Bertolin2017-03-191-0/+24
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Revert "Add integration test for trashbin"Morris Jobke2017-03-171-1/+10
|
* Add integration test for trashbinVincent Petry2017-03-161-10/+1
| | | | | | | | | Add test for basic deletion. Add test when deleting from shared folder as recipient. Add test to check that metadata stays when moving out of shared folder as recipient. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Test remember-me loginChristoph Wurst2017-01-021-6/+9
| | | | | | | This adds a simple integration test that ensures that remembered login works when the session cookies vanish. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Changed data directory for work oneSergio Bertolin2016-12-231-2/+2
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add sleep functionRoeland Jago Douma2016-11-041-0/+8
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Changed request to not add a prefix to the url (#26256)Sergio Bertolín2016-10-201-0/+9
| | | | | | | | * Changed request to not add a prefix to the url * Expecting forbidden instead of service unavailable * Handling login exceptions
* Orphaned shares test and some requirementsSergio Bertolín2016-10-061-0/+31
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Added quota calculation test when a file is recievedSergio Bertolin2016-10-021-1/+1
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Added test checking quota after usageSergio Bertolin2016-10-021-0/+7
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Add basic osc intergration testsRoeland Jago Douma2016-09-071-0/+8
|
* Creating the folder when the tests runSergio Bertolín2016-08-301-2/+2
|
* External storage was not enabled and content was not deleted before scenariosSergio Bertolín2016-08-301-1/+13
|
* Removed extra context added needed option and remove storage after external ↵Sergio Bertolin2016-08-301-0/+12
| | | | storage scenarios
* Fix intergration testsRoeland Jago Douma2016-08-141-0/+7
| | | | | * Set OCS-APIREQUEST: true * PUT requires a body
* Add OCS-APIREQUEST header to intergration test callsRoeland Jago Douma2016-08-051-0/+3
|